[Taranis] Default Batt range / alarm
[Taranis] No USR Protocol selection
This commit is contained in:
+4
-4
@@ -104,12 +104,12 @@ const pm_char * openLogs()
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
if (g_model.frsky.usrProto == USR_PROTO_FRSKY)
|
||||
if (IS_USR_PROTO_FRSKY_HUB())
|
||||
f_puts("GPS Date,GPS Time,Long,Lat,Course,GPS Speed,GPS Alt,Baro Alt,Temp1,Temp2,RPM,Fuel,Volts,AccelX,AccelY,AccelZ,", &g_oLogFile);
|
||||
#endif
|
||||
|
||||
#if defined(WS_HOW_HIGH)
|
||||
if (g_model.frsky.usrProto == USR_PROTO_WS_HOW_HIGH)
|
||||
if (IS_USR_PROTO_WS_HOW_HIGH())
|
||||
f_puts("WSHH Alt,", &g_oLogFile);
|
||||
#endif
|
||||
|
||||
@@ -173,7 +173,7 @@ void writeLogs()
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
if (g_model.frsky.usrProto == USR_PROTO_FRSKY) {
|
||||
if (IS_USR_PROTO_FRSKY_HUB()) {
|
||||
f_printf(&g_oLogFile, "%4d-%02d-%02d,", frskyData.hub.year+2000, frskyData.hub.month, frskyData.hub.day);
|
||||
f_printf(&g_oLogFile, "%02d:%02d:%02d,", frskyData.hub.hour, frskyData.hub.min, frskyData.hub.sec);
|
||||
f_printf(&g_oLogFile, "%03d.%04d%c,", frskyData.hub.gpsLongitude_bp, frskyData.hub.gpsLongitude_ap,
|
||||
@@ -193,7 +193,7 @@ void writeLogs()
|
||||
#endif
|
||||
|
||||
#if defined(WS_HOW_HIGH)
|
||||
if (g_model.frsky.usrProto == USR_PROTO_WS_HOW_HIGH) {
|
||||
if (IS_USR_PROTO_WS_HOW_HIGH()) {
|
||||
f_printf(&g_oLogFile, "%d,", TELEMETRY_GPS_ALT_BP);
|
||||
}
|
||||
#endif
|
||||
|
||||
+9
-3
@@ -3808,7 +3808,9 @@ enum menuModelTelemetryItems {
|
||||
ITEM_TELEMETRY_RSSI_ALARM2,
|
||||
#if defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||
ITEM_TELEMETRY_USR_LABEL,
|
||||
#if !defined(PCBTARANIS)
|
||||
ITEM_TELEMETRY_USR_PROTO,
|
||||
#endif
|
||||
ITEM_TELEMETRY_USR_BLADES,
|
||||
#endif
|
||||
ITEM_TELEMETRY_USR_VOLTAGE_SOURCE,
|
||||
@@ -3836,10 +3838,12 @@ enum menuModelTelemetryItems {
|
||||
ITEM_TELEMETRY_MAX
|
||||
};
|
||||
|
||||
#if defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||
#define USRDATA_LINES (uint8_t)-1, 0, 0,
|
||||
#if defined(PCBTARANIS)
|
||||
#define USRDATA_LINES (uint8_t)-1, 0,
|
||||
#elif defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||
#define USRDATA_LINES (uint8_t)-1, 0, 0,
|
||||
#else
|
||||
#define USRDATA_LINES
|
||||
#define USRDATA_LINES
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY)
|
||||
@@ -3990,11 +3994,13 @@ void menuModelTelemetry(uint8_t event)
|
||||
lcd_putsLeft(y, STR_USRDATA);
|
||||
break;
|
||||
|
||||
#if !defined(PCBTARANIS)
|
||||
case ITEM_TELEMETRY_USR_PROTO:
|
||||
lcd_putsLeft(y, STR_PROTO);
|
||||
lcd_putsiAtt(TELEM_COL2, y, STR_VTELPROTO, g_model.frsky.usrProto, attr);
|
||||
if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.usrProto, USR_PROTO_LAST);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_TELEMETRY_USR_BLADES:
|
||||
lcd_putsLeft(y, STR_BLADES);
|
||||
|
||||
+12
-1
@@ -361,7 +361,14 @@ void generalDefault()
|
||||
g_eeGeneral.version = EEPROM_VER;
|
||||
g_eeGeneral.variant = EEPROM_VARIANT;
|
||||
g_eeGeneral.contrast = 25;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
g_eeGeneral.vBatWarn = 65;
|
||||
g_eeGeneral.vBatMin = -30;
|
||||
g_eeGeneral.vBatMax = -40;
|
||||
#else
|
||||
g_eeGeneral.vBatWarn = 90;
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < NUM_STICKS+NUM_POTS; ++i) {
|
||||
g_eeGeneral.calibMid[i] = 0x200;
|
||||
@@ -414,6 +421,10 @@ void modelDefault(uint8_t id)
|
||||
modelIds[id] = g_model.modelId = id+1;
|
||||
checkModelIdUnique(id);
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
g_model.frsky.channels[0].ratio = 132;
|
||||
#endif
|
||||
}
|
||||
|
||||
int16_t intpol(int16_t x, uint8_t idx) // -100, -75, -50, -25, 0, 25 ,50, 75, 100
|
||||
@@ -2269,7 +2280,7 @@ PLAY_FUNCTION(playValue, uint8_t idx)
|
||||
case MIXSRC_FIRST_TELEM-1+TELEM_MIN_ALT-1:
|
||||
case MIXSRC_FIRST_TELEM-1+TELEM_MAX_ALT-1:
|
||||
#if defined(WS_HOW_HIGH)
|
||||
if (IS_IMPERIAL_ENABLE() && g_model.frsky.usrProto == USR_PROTO_WS_HOW_HIGH)
|
||||
if (IS_IMPERIAL_ENABLE() && IS_USR_PROTO_WS_HOW_HIGH())
|
||||
PLAY_NUMBER(val, 1+UNIT_FEET, 0);
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -1390,5 +1390,12 @@ void varioWakeup();
|
||||
#define IS_IMPERIAL_ENABLE() (0)
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define IS_USR_PROTO_FRSKY_HUB() (1)
|
||||
#define IS_USR_PROTO_WS_HOW_HIGH() (0)
|
||||
#else
|
||||
#define IS_USR_PROTO_FRSKY_HUB() (g_model.frsky.usrProto == USR_PROTO_FRSKY)
|
||||
#define IS_USR_PROTO_WS_HOW_HIGH() (g_model.frsky.usrProto == USR_PROTO_WS_HOW_HIGH)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -319,11 +319,11 @@ void processFrskyPacket(uint8_t *packet)
|
||||
uint8_t numBytes = 3 + (packet[1] & 0x07); // sanitize in case of data corruption leading to buffer overflow
|
||||
for (uint8_t i=3; i<numBytes; i++) {
|
||||
#if defined(FRSKY_HUB)
|
||||
if (g_model.frsky.usrProto == USR_PROTO_FRSKY)
|
||||
if (IS_USR_PROTO_FRSKY_HUB())
|
||||
parseTelemHubByte(packet[i]);
|
||||
#endif
|
||||
#if defined(WS_HOW_HIGH)
|
||||
if (g_model.frsky.usrProto == USR_PROTO_WS_HOW_HIGH)
|
||||
if (IS_USR_PROTO_WS_HOW_HIGH())
|
||||
parseTelemWSHowHighByte(packet[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val,
|
||||
case TELEM_ALT-1:
|
||||
case TELEM_MIN_ALT-1:
|
||||
case TELEM_MAX_ALT-1:
|
||||
if (IS_IMPERIAL_ENABLE() && g_model.frsky.usrProto == USR_PROTO_WS_HOW_HIGH) {
|
||||
if (IS_IMPERIAL_ENABLE() && IS_USR_PROTO_WS_HOW_HIGH()) {
|
||||
putsTelemetryValue(x, y, val, UNIT_FEET, att);
|
||||
break;
|
||||
}
|
||||
@@ -560,7 +560,7 @@ void menuTelemetryFrsky(uint8_t event)
|
||||
#if defined(FRSKY_HUB)
|
||||
else if (s_frsky_view == e_frsky_after_flight) {
|
||||
uint8_t line=1*FH+1;
|
||||
if (g_model.frsky.usrProto == USR_PROTO_FRSKY) {
|
||||
if (IS_USR_PROTO_FRSKY_HUB()) {
|
||||
// Latitude
|
||||
lcd_putsLeft(line, STR_LATITUDE);
|
||||
displayGpsCoord(line, frskyData.hub.gpsLatitudeNS, frskyData.hub.gpsLatitude_bp, frskyData.hub.gpsLatitude_ap);
|
||||
|
||||
Reference in New Issue
Block a user