DSM2 Range Check (half) implemented in model SETUP protocol setting.
Half -- because I don't yet know how to make warning sounds in this new code. HELP! :P ... otherwise it's working. I have confirmed that the range check bit appears on the scope, while watching the DSM2 data stream.
This commit is contained in:
+11
-3
@@ -789,13 +789,21 @@ void menuProcModel(uint8_t event)
|
|||||||
}
|
}
|
||||||
#if defined(DSM2) || defined(PXX)
|
#if defined(DSM2) || defined(PXX)
|
||||||
else if (IS_DSM2_PROTOCOL(protocol) || IS_PXX_PROTOCOL(protocol)) {
|
else if (IS_DSM2_PROTOCOL(protocol) || IS_PXX_PROTOCOL(protocol)) {
|
||||||
if (attr && m_posHorz > 0 && IS_DSM2_PROTOCOL(protocol))
|
if (attr && m_posHorz > 1 && IS_DSM2_PROTOCOL(protocol))
|
||||||
m_posHorz = 0;
|
m_posHorz = 0; // limit 3 column row to 2 colums for DSM2 protocol (Rx_Num and RANGE fields)
|
||||||
|
|
||||||
lcd_putsLeft(y, STR_RXNUM);
|
lcd_putsLeft(y, STR_RXNUM);
|
||||||
lcd_outdezNAtt(MODEL_PARAM_OFS-(IS_DSM2_PROTOCOL(protocol) ? 0 : 3*FW), y, g_model.modelId, ((attr && m_posHorz==0) ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0) | LEADING0|LEFT, 2);
|
lcd_outdezNAtt(MODEL_PARAM_OFS-(IS_DSM2_PROTOCOL(protocol) ? 0 : 3*FW), y, g_model.modelId, ((attr && m_posHorz==0) ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0) | LEADING0|LEFT, 2);
|
||||||
|
|
||||||
if (attr && (IS_DSM2_PROTOCOL(protocol) || (m_posHorz==0 && (s_editMode>0 || p1valdiff))))
|
if (IS_DSM2_PROTOCOL(protocol)) { // RANGE CHECK
|
||||||
|
lcd_putsnAtt(MODEL_PARAM_OFS+4*FW, y, PSTR(" RANGE<range")+6*(s_rangecheck_mode), 6, (m_posHorz==1 ? attr : 0));
|
||||||
|
if (attr && m_posHorz==1 && s_editMode>0)
|
||||||
|
s_rangecheck_mode = true;
|
||||||
|
else
|
||||||
|
s_rangecheck_mode = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attr && (m_posHorz==0 && (s_editMode>0 || p1valdiff)))
|
||||||
CHECK_INCDEC_MODELVAR(event, g_model.modelId, 0, 99);
|
CHECK_INCDEC_MODELVAR(event, g_model.modelId, 0, 99);
|
||||||
|
|
||||||
#if defined(PXX)
|
#if defined(PXX)
|
||||||
|
|||||||
@@ -419,6 +419,7 @@ normal:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
bool s_bind_mode = false; // Issue 98
|
bool s_bind_mode = false; // Issue 98
|
||||||
|
bool s_rangecheck_mode = false;
|
||||||
uint8_t s_bind_allowed = 255; // Issue 98
|
uint8_t s_bind_allowed = 255; // Issue 98
|
||||||
|
|
||||||
FORCEINLINE void setupPulsesDsm2()
|
FORCEINLINE void setupPulsesDsm2()
|
||||||
@@ -430,6 +431,10 @@ FORCEINLINE void setupPulsesDsm2()
|
|||||||
s_bind_mode = true;
|
s_bind_mode = true;
|
||||||
*ptr++ = BIND_BIT;
|
*ptr++ = BIND_BIT;
|
||||||
}
|
}
|
||||||
|
else if (s_rangecheck_mode)
|
||||||
|
{
|
||||||
|
*ptr++ = RANGECHECK_BIT;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s_bind_mode = false;
|
s_bind_mode = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user