Register Loop Index now retrieven from RX at Register (not always 0)
This commit is contained in:
@@ -380,11 +380,11 @@ void runPopupRegister(event_t event)
|
||||
lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y - 4, STR_REG_ID);
|
||||
editName(WARNING_LINE_X + 8*FW, WARNING_LINE_Y - 4, g_model.modelRegistrationID, PXX2_LEN_REGISTRATION_ID, event, menuVerticalPosition == ITEM_REGISTER_PASSWORD);
|
||||
|
||||
// module index
|
||||
// loop index (will be removed in future)
|
||||
lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y - 4 + FH, "UID");
|
||||
lcdDrawNumber(WARNING_LINE_X + 8*FW, WARNING_LINE_Y - 4 + FH, reusableBuffer.moduleSetup.pxx2.registerModuleIndex, menuVerticalPosition == ITEM_REGISTER_MODULE_INDEX ? (s_editMode ? INVERS + BLINK : INVERS) : 0);
|
||||
lcdDrawNumber(WARNING_LINE_X + 8*FW, WARNING_LINE_Y - 4 + FH, reusableBuffer.moduleSetup.pxx2.registerLoopIndex, menuVerticalPosition == ITEM_REGISTER_MODULE_INDEX ? (s_editMode ? INVERS + BLINK : INVERS) : 0);
|
||||
if (menuVerticalPosition == ITEM_REGISTER_MODULE_INDEX && s_editMode) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, reusableBuffer.moduleSetup.pxx2.registerModuleIndex, 7);
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, reusableBuffer.moduleSetup.pxx2.registerLoopIndex, 7);
|
||||
}
|
||||
|
||||
// RX name
|
||||
|
||||
+1
-1
@@ -1142,7 +1142,7 @@ union ReusableBuffer
|
||||
uint8_t registerPopupHorizontalPosition;
|
||||
int8_t registerPopupEditMode;
|
||||
char registerRxName[PXX2_LEN_RX_NAME];
|
||||
uint8_t registerModuleIndex;
|
||||
uint8_t registerLoopIndex; // will be removed later
|
||||
char bindCandidateReceiversNames[PXX2_MAX_RECEIVERS_PER_MODULE][PXX2_LEN_RX_NAME + 1];
|
||||
uint8_t bindCandidateReceiversCount;
|
||||
uint8_t bindReceiverIndex;
|
||||
|
||||
@@ -160,7 +160,7 @@ void Pxx2Pulses::setupRegisterFrame(uint8_t module)
|
||||
for (uint8_t i=0; i<PXX2_LEN_REGISTRATION_ID; i++) {
|
||||
Pxx2Transport::addByte(zchar2char(g_model.modelRegistrationID[i]));
|
||||
}
|
||||
Pxx2Transport::addByte(reusableBuffer.moduleSetup.pxx2.registerModuleIndex);
|
||||
Pxx2Transport::addByte(reusableBuffer.moduleSetup.pxx2.registerLoopIndex);
|
||||
}
|
||||
else {
|
||||
Pxx2Transport::addByte(0);
|
||||
|
||||
@@ -109,6 +109,7 @@ void processRegisterFrame(uint8_t module, uint8_t * frame)
|
||||
if (reusableBuffer.moduleSetup.pxx2.registerStep == REGISTER_START) {
|
||||
// RX_NAME follows, we store it for the next step
|
||||
str2zchar(reusableBuffer.moduleSetup.pxx2.registerRxName, (const char *)&frame[4], PXX2_LEN_RX_NAME);
|
||||
reusableBuffer.moduleSetup.pxx2.registerLoopIndex = frame[12];
|
||||
reusableBuffer.moduleSetup.pxx2.registerStep = REGISTER_RX_NAME_RECEIVED;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user