fix IR inputParam

This commit is contained in:
DashyFox 2024-09-01 22:14:37 +03:00
parent df2b8c8a8c
commit 0066eafb86

View File

@ -69,7 +69,6 @@ void IR_CMD_Handler() {
|| !dataHandled_flag) {
dataHandled_flag = 1;
if (IR_Address == 0x01) {
printNumber(data.command);
InputHandler();
inputInProgerss = 1;
inputInProgerss_timer = millis();
@ -96,10 +95,10 @@ void IR_ParamEnter() {
if (0 <= data.command && data.command <= 9) {
if (digitInputInProgerss) {
inputParam = inputParam * 10; // dec shift << 1
inputParam += data.command + 1;
inputParam += (data.command + 1) % 10;
SetShiftReg_inline(0xF0, 0, 0);
} else {
inputParam = data.command + 1;
inputParam = (data.command + 1) % 10;
}
digitInputInProgerss = 1;
} else {
@ -108,6 +107,8 @@ void IR_ParamEnter() {
case IR_ENTER:
if(inputParam != NULL_NumberParam){
print("Enter: ");
printNumber(inputParam);
SetShiftReg_inline(0, 0, inputParam);
onParamEnter();
}