radiochannel in uart

This commit is contained in:
milek7
2019-09-07 14:52:54 +02:00
parent 511b96b470
commit e8675e3599
3 changed files with 7 additions and 3 deletions

View File

@@ -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
};
}

View File

@@ -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;

View File

@@ -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)