mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
radiochannel in uart
This commit is contained in:
@@ -615,7 +615,8 @@ TTrain::get_state() const {
|
||||
fHVoltage,
|
||||
{ fHCurrent[ ( mvControlled->TrainType & dt_EZT ) ? 0 : 1 ], fHCurrent[ 2 ], fHCurrent[ 3 ] },
|
||||
ggLVoltage.GetValue(),
|
||||
mvOccupied->DistCounter
|
||||
mvOccupied->DistCounter,
|
||||
iRadioChannel
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
1
Train.h
1
Train.h
@@ -104,6 +104,7 @@ class TTrain {
|
||||
std::array<float, 3> hv_current;
|
||||
float lv_voltage;
|
||||
double distance;
|
||||
int radio_channel;
|
||||
};
|
||||
typedef std::tuple<std::string, std::shared_ptr<python_rt>, std::unique_ptr<python_screen_viewer>> screen_entry;
|
||||
typedef std::vector<screen_entry> screen_map;
|
||||
|
||||
6
uart.cpp
6
uart.cpp
@@ -306,8 +306,10 @@ void uart_input::poll()
|
||||
SPLIT_INT16((uint16_t)odometer), SPLIT_INT16((uint16_t)(odometer >> 16)),
|
||||
//byte 31-32
|
||||
SPLIT_INT16(lv_voltage),
|
||||
//byte 33-48
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
//byte 33
|
||||
(uint8_t)trainstate.radio_channel,
|
||||
//byte 34-48
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
if (conf.debug)
|
||||
|
||||
Reference in New Issue
Block a user