mirror of
https://github.com/DashyFox/StackSport.git
synced 2025-05-04 15:20:16 +00:00
fix IR inputParam
This commit is contained in:
parent
df2b8c8a8c
commit
0066eafb86
@ -69,7 +69,6 @@ void IR_CMD_Handler() {
|
|||||||
|| !dataHandled_flag) {
|
|| !dataHandled_flag) {
|
||||||
dataHandled_flag = 1;
|
dataHandled_flag = 1;
|
||||||
if (IR_Address == 0x01) {
|
if (IR_Address == 0x01) {
|
||||||
printNumber(data.command);
|
|
||||||
InputHandler();
|
InputHandler();
|
||||||
inputInProgerss = 1;
|
inputInProgerss = 1;
|
||||||
inputInProgerss_timer = millis();
|
inputInProgerss_timer = millis();
|
||||||
@ -96,10 +95,10 @@ void IR_ParamEnter() {
|
|||||||
if (0 <= data.command && data.command <= 9) {
|
if (0 <= data.command && data.command <= 9) {
|
||||||
if (digitInputInProgerss) {
|
if (digitInputInProgerss) {
|
||||||
inputParam = inputParam * 10; // dec shift << 1
|
inputParam = inputParam * 10; // dec shift << 1
|
||||||
inputParam += data.command + 1;
|
inputParam += (data.command + 1) % 10;
|
||||||
SetShiftReg_inline(0xF0, 0, 0);
|
SetShiftReg_inline(0xF0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
inputParam = data.command + 1;
|
inputParam = (data.command + 1) % 10;
|
||||||
}
|
}
|
||||||
digitInputInProgerss = 1;
|
digitInputInProgerss = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -108,6 +107,8 @@ void IR_ParamEnter() {
|
|||||||
|
|
||||||
case IR_ENTER:
|
case IR_ENTER:
|
||||||
if(inputParam != NULL_NumberParam){
|
if(inputParam != NULL_NumberParam){
|
||||||
|
print("Enter: ");
|
||||||
|
printNumber(inputParam);
|
||||||
SetShiftReg_inline(0, 0, inputParam);
|
SetShiftReg_inline(0, 0, inputParam);
|
||||||
onParamEnter();
|
onParamEnter();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user