mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 00:35:18 +03:00
parent
e4f8735c7a
commit
cc585950c3
3 changed files with 8 additions and 2 deletions
|
@ -104,7 +104,7 @@ void menuModelSensor(event_t event)
|
||||||
if (sensor->type == TELEM_TYPE_CUSTOM) {
|
if (sensor->type == TELEM_TYPE_CUSTOM) {
|
||||||
lcdDrawTextAlignedLeft(y, STR_ID);
|
lcdDrawTextAlignedLeft(y, STR_ID);
|
||||||
lcdDrawHexNumber(SENSOR_2ND_COLUMN, y, sensor->id, LEFT|(menuHorizontalPosition==0 ? attr : 0));
|
lcdDrawHexNumber(SENSOR_2ND_COLUMN, y, sensor->id, LEFT|(menuHorizontalPosition==0 ? attr : 0));
|
||||||
lcdDrawHexChar(SENSOR_3RD_COLUMN, y, (sensor->instance & 0x1F) + 1, LEFT|(menuHorizontalPosition==1 ? attr : 0));
|
lcdDrawNumber(SENSOR_3RD_COLUMN, y, (sensor->instance & 0x1F) + 1, LEFT|(menuHorizontalPosition==1 ? attr : 0));
|
||||||
if (attr && s_editMode > 0) {
|
if (attr && s_editMode > 0) {
|
||||||
switch (menuHorizontalPosition) {
|
switch (menuHorizontalPosition) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -326,7 +326,7 @@ uint8_t OpenTxSimulator::getSensorInstance(uint16_t id, uint8_t defaultValue)
|
||||||
if (isTelemetryFieldAvailable(i)) {
|
if (isTelemetryFieldAvailable(i)) {
|
||||||
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
|
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
|
||||||
if (sensor->id == id) {
|
if (sensor->id == id) {
|
||||||
return sensor->instance;
|
return sensor->frskyInstance.physID + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,13 @@ void sportProcessTelemetryPacketWithoutCrc(uint8_t origin, const uint8_t * packe
|
||||||
if (primId == DATA_FRAME) {
|
if (primId == DATA_FRAME) {
|
||||||
uint8_t originMask;
|
uint8_t originMask;
|
||||||
if (origin == TELEMETRY_ENDPOINT_SPORT) {
|
if (origin == TELEMETRY_ENDPOINT_SPORT) {
|
||||||
|
#if defined(SIMU) && defined(INTERNAL_MODULE_PXX2)
|
||||||
|
// When running simu on ACCESS radio, we set the origin as internal module
|
||||||
|
origin = 0;
|
||||||
|
originMask = 0x01;
|
||||||
|
#else
|
||||||
originMask = 0x04;
|
originMask = 0x04;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uint8_t moduleIndex = (origin >> 2);
|
uint8_t moduleIndex = (origin >> 2);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue