I change again my mind for telemetry: now Range and Offset. Audio sounds now have a name. Haptic sounds skipped when HAPTIC=NO

This commit is contained in:
bsongis
2012-02-04 17:34:25 +00:00
parent 064d0eeb20
commit 1d8fb1f6ee
7 changed files with 25 additions and 14 deletions
+2
View File
@@ -298,6 +298,7 @@ void audioQueue::event(uint8_t e, uint8_t f)
case AU_FRSKY_TICK:
playASAP(BEEP_DEFAULT_FREQ+50,5,50,2,1);
break;
#ifdef HAPTIC
case AU_FRSKY_HAPTIC1:
playASAP(0,20,10,1,1);
break;
@@ -307,6 +308,7 @@ void audioQueue::event(uint8_t e, uint8_t f)
case AU_FRSKY_HAPTIC3:
playASAP(0,20,10,3,1);
break;
#endif
default:
break;
}
+2
View File
@@ -70,9 +70,11 @@ enum AUDIO_SOUNDS {
AU_FRSKY_ALARMC,
AU_FRSKY_RATATA,
AU_FRSKY_TICK,
#ifdef HAPTIC
AU_FRSKY_HAPTIC1,
AU_FRSKY_HAPTIC2,
AU_FRSKY_HAPTIC3,
#endif
AU_FRSKY_LAST,
};
+6 -4
View File
@@ -1772,6 +1772,7 @@ void menuProcFunctionSwitches(uint8_t event)
#ifdef AUDIO
val_min = 0;
val_max = AU_FRSKY_LAST-AU_FRSKY_FIRST-1;
lcd_putsnAtt(15*FW, y, STR_FUNCSOUNDS+LEN_FUNCSOUNDS*val_displayed, LEN_FUNCSOUNDS, attr);
#else
break;
#endif
@@ -1780,11 +1781,12 @@ void menuProcFunctionSwitches(uint8_t event)
val_displayed = (int8_t)sd->param;
val_min = -125;
val_max = 125;
lcd_outdezAtt(21*FW, y, val_displayed, attr);
}
else {
break;
}
lcd_outdezAtt(21*FW, y, val_displayed, attr);
if (active) {
CHECK_INCDEC_MODELVAR(event, sd->param, val_min, val_max);
}
@@ -1871,8 +1873,8 @@ void menuProcTelemetry(uint8_t event)
if(s_pgOfs<subN) {
y=(subN-s_pgOfs)*FH;
lcd_puts_P(4, y, STR_MAX);
putsTelemetryChannel(8*FW, y, i, 255, (sub==subN && m_posHorz==0 ? blink:0)|NO_UNIT|LEFT);
lcd_puts_P(4, y, STR_RANGE);
putsTelemetryValue(8*FW, y, g_model.frsky.channels[i].ratio, g_model.frsky.channels[i].type, (sub==subN && m_posHorz==0 ? blink:0)|NO_UNIT|LEFT);
lcd_putsnAtt(lcd_lastPos, y, STR_VTELEMUNIT+LEN_VTELEMUNIT*g_model.frsky.channels[i].type, LEN_VTELEMUNIT, (sub==subN && m_posHorz==1 ? blink:0));
if (sub==subN && (s_editMode>0 || p1valdiff)) {
if (m_posHorz == 0)
@@ -1885,7 +1887,7 @@ void menuProcTelemetry(uint8_t event)
if(s_pgOfs<subN) {
y=(subN-s_pgOfs)*FH;
lcd_puts_P(4, y, STR_MIN);
lcd_puts_P(4, y, STR_OFFSET);
putsTelemetryChannel(8*FW, y, i, 0, (sub==subN ? blink:0)|LEFT);
if(sub==subN) CHECK_INCDEC_MODELVAR(event, g_model.frsky.channels[i].offset, -127, 127);
}
+2 -2
View File
@@ -22,6 +22,7 @@ const pm_char STR_OPEN9X[] PROGMEM =
TR_VMIXTRIMS
TR_VCSWFUNC
TR_VFSWFUNC
TR_FUNCSOUNDS
#ifdef FRSKY
TR_VTELEMUNIT
TR_VALARM
@@ -105,8 +106,7 @@ const pm_char STR_COPYTRIMMENU[] PROGMEM = TR_COPYTRIMMENU;
const pm_char STR_CV[] PROGMEM = TR_CV;
const pm_char STR_SW[] PROGMEM = TR_SW;
const pm_char STR_ACHANNEL[] PROGMEM = TR_ACHANNEL;
const pm_char STR_MAX[] PROGMEM = TR_MAX;
const pm_char STR_MIN[] PROGMEM = TR_MIN;
const pm_char STR_RANGE[] PROGMEM = TR_RANGE;
const pm_char STR_BAR[] PROGMEM = TR_BAR;
const pm_char STR_ALARM[] PROGMEM = TR_ALARM;
const pm_char STR_USRPROTO[] PROGMEM = TR_USRPROTO;
+5 -4
View File
@@ -35,15 +35,16 @@ extern const pm_char STR_OPEN9X[];
#define OFS_VMIXTRIMS (OFS_VMLTPX2 + PSIZE(TR_VMLTPX2))
#define OFS_VCSWFUNC (OFS_VMIXTRIMS + PSIZE(TR_VMIXTRIMS))
#define OFS_VFSWFUNC (OFS_VCSWFUNC + PSIZE(TR_VCSWFUNC))
#define OFS_FUNCSOUNDS (OFS_VFSWFUNC + PSIZE(TR_VFSWFUNC))
#ifdef FRSKY
#define OFS_VTELEMUNIT (OFS_VFSWFUNC + PSIZE(TR_VFSWFUNC))
#define OFS_VTELEMUNIT (OFS_FUNCSOUNDS + PSIZE(TR_FUNCSOUNDS))
#define OFS_VALARM (OFS_VTELEMUNIT + PSIZE(TR_VTELEMUNIT))
#define OFS_VALARMFN (OFS_VALARM + PSIZE(TR_VALARM))
#define OFS_VTELPROTO (OFS_VALARMFN + PSIZE(TR_VALARMFN))
#define OFS_TELEMCHNS (OFS_VTELPROTO + PSIZE(TR_VTELPROTO))
#define OFS_ENDTELEM (OFS_TELEMCHNS + PSIZE(TR_TELEMCHNS))
#else
#define OFS_ENDTELEM (OFS_VFSWFUNC + PSIZE(TR_VFSWFUNC))
#define OFS_ENDTELEM (OFS_FUNCSOUNDS + PSIZE(TR_FUNCSOUNDS))
#endif
#ifdef TEMPLATES
#define OFS_VTEMPLATES (OFS_ENDTELEM)
@@ -95,6 +96,7 @@ extern const pm_char STR_OPEN9X[];
#define STR_VMIXTRIMS (STR_OPEN9X + OFS_VMIXTRIMS)
#define STR_VCSWFUNC (STR_OPEN9X + OFS_VCSWFUNC)
#define STR_VFSWFUNC (STR_OPEN9X + OFS_VFSWFUNC)
#define STR_FUNCSOUNDS (STR_OPEN9X + OFS_FUNCSOUNDS)
#ifdef FRSKY
#define STR_VTELEMUNIT (STR_OPEN9X + OFS_VTELEMUNIT)
@@ -183,8 +185,7 @@ extern const pm_char STR_COPYTRIMMENU[];
extern const pm_char STR_CV[];
extern const pm_char STR_SW[];
extern const pm_char STR_ACHANNEL[];
extern const pm_char STR_MAX[];
extern const pm_char STR_MIN[];
extern const pm_char STR_RANGE[];
extern const pm_char STR_BAR[];
extern const pm_char STR_ALARM[];
extern const pm_char STR_USRPROTO[];
+4 -2
View File
@@ -67,6 +67,9 @@
#endif
#define TR_VFSWFUNC "Security \0 ""Trainer \0 ""Instant Trim ""Trims2Offsets""Play sound " TR_SDCLOGGS
#define LEN_FUNCSOUNDS 6
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick ""Haptc1""Haptc2""Haptc3"
#define LEN_VTELEMUNIT 1
#define TR_VTELEMUNIT "v""-"
@@ -171,8 +174,7 @@
#define TR_CV "CV"
#define TR_SW "SW"
#define TR_ACHANNEL "A channel"
#define TR_MAX "Max"
#define TR_MIN "Min"
#define TR_RANGE "Range"
#define TR_BAR "Bar"
#define TR_ALARM "Alarm"
#define TR_USRPROTO "UsrProto"
+4 -2
View File
@@ -67,6 +67,9 @@
#endif
#define TR_VFSWFUNC "Securite \0 ""Ecolage \0 ""Trim instant ""Trims2Offsets""Jouer son " TR_SDCLOGGS
#define LEN_FUNCSOUNDS 6
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick ""Haptc1""Haptc2""Haptc3"
#define LEN_VTELEMUNIT 1
#define TR_VTELEMUNIT "v""-"
@@ -171,8 +174,7 @@
#define TR_CV "CV"
#define TR_SW "SW"
#define TR_ACHANNEL "A voie"
#define TR_MAX "Max"
#define TR_MIN "Min"
#define TR_RANGE "Range"
#define TR_BAR "Bar"
#define TR_ALARM "Alarme"
#define TR_USRPROTO "UsrProto"