mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02:00
radiochannel in uart
This commit is contained in:
@@ -615,7 +615,8 @@ TTrain::get_state() const {
|
|||||||
fHVoltage,
|
fHVoltage,
|
||||||
{ fHCurrent[ ( mvControlled->TrainType & dt_EZT ) ? 0 : 1 ], fHCurrent[ 2 ], fHCurrent[ 3 ] },
|
{ fHCurrent[ ( mvControlled->TrainType & dt_EZT ) ? 0 : 1 ], fHCurrent[ 2 ], fHCurrent[ 3 ] },
|
||||||
ggLVoltage.GetValue(),
|
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;
|
std::array<float, 3> hv_current;
|
||||||
float lv_voltage;
|
float lv_voltage;
|
||||||
double distance;
|
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::tuple<std::string, std::shared_ptr<python_rt>, std::unique_ptr<python_screen_viewer>> screen_entry;
|
||||||
typedef std::vector<screen_entry> screen_map;
|
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)),
|
SPLIT_INT16((uint16_t)odometer), SPLIT_INT16((uint16_t)(odometer >> 16)),
|
||||||
//byte 31-32
|
//byte 31-32
|
||||||
SPLIT_INT16(lv_voltage),
|
SPLIT_INT16(lv_voltage),
|
||||||
//byte 33-48
|
//byte 33
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
(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)
|
if (conf.debug)
|
||||||
|
|||||||
Reference in New Issue
Block a user