mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
New MODULES / RX VERSION screen should be OK now
This commit is contained in:
parent
919a5fa3ce
commit
49faf25c80
1 changed files with 21 additions and 0 deletions
|
@ -71,6 +71,23 @@ void processTelemetryData(uint8_t data)
|
||||||
processFrskyTelemetryData(data);
|
processFrskyTelemetryData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void processGetHardwareInfoFrame(uint8_t module, uint8_t * frame)
|
||||||
|
{
|
||||||
|
if (moduleSettings[module].mode != MODULE_MODE_GET_HARDWARE_INFO) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t index = frame[3];
|
||||||
|
if (index == 0xFF) {
|
||||||
|
reusableBuffer.hardware.modules[module].hw_version = *((uint32_t *)&frame[4]);
|
||||||
|
reusableBuffer.hardware.modules[module].sw_version = *((uint32_t *)&frame[8]);
|
||||||
|
}
|
||||||
|
else if (index < PXX2_MAX_RECEIVERS_PER_MODULE){
|
||||||
|
reusableBuffer.hardware.modules[module].receivers[index].hw_version = *((uint32_t *)&frame[4]);
|
||||||
|
reusableBuffer.hardware.modules[module].receivers[index].sw_version = *((uint32_t *)&frame[8]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void processRegisterFrame(uint8_t module, uint8_t * frame)
|
void processRegisterFrame(uint8_t module, uint8_t * frame)
|
||||||
{
|
{
|
||||||
if (moduleSettings[module].mode != MODULE_MODE_REGISTER) {
|
if (moduleSettings[module].mode != MODULE_MODE_REGISTER) {
|
||||||
|
@ -151,6 +168,10 @@ void processSpectrumFrame(uint8_t module, uint8_t * frame)
|
||||||
void processRadioFrame(uint8_t module, uint8_t * frame)
|
void processRadioFrame(uint8_t module, uint8_t * frame)
|
||||||
{
|
{
|
||||||
switch (frame[2]) {
|
switch (frame[2]) {
|
||||||
|
case PXX2_TYPE_ID_HW_INFO:
|
||||||
|
processGetHardwareInfoFrame(module, frame);
|
||||||
|
break;
|
||||||
|
|
||||||
case PXX2_TYPE_ID_REGISTER:
|
case PXX2_TYPE_ID_REGISTER:
|
||||||
processRegisterFrame(module, frame);
|
processRegisterFrame(module, frame);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue