mirror of
https://github.com/DashyFox/StackSport.git
synced 2025-06-28 13:19:41 +00:00
fix rc debug and ir logic
This commit is contained in:
@ -104,7 +104,8 @@ void IR_CMD_Handler() {
|
||||
lastRepeatTime = millis(); // Обновляем время последнего вызова
|
||||
// uint8_t blinkPeriod = 10;
|
||||
led_writeMirror(9, 1);
|
||||
|
||||
HAL_Delay(1);
|
||||
led_writeMirror(9,0);
|
||||
|
||||
onHoldRepeat(); // Вызываем функцию при удержании
|
||||
|
||||
@ -129,16 +130,13 @@ void IR_CMD_Clear() {
|
||||
inputInProgerss = 0;
|
||||
digitInputInProgerss = 0;
|
||||
inputParam = NULL_NumberParam;
|
||||
// SetShiftReg_inline(0, 0xff, 0);
|
||||
}
|
||||
|
||||
void IR_ParamEnter() {
|
||||
// SetShiftReg_inline(0x03, 0, 0);
|
||||
if (0 <= data.command && data.command <= 9) {
|
||||
if (digitInputInProgerss) {
|
||||
inputParam = inputParam * 10; // dec shift << 1
|
||||
inputParam += (data.command + 1) % 10;
|
||||
// SetShiftReg_inline(0xF0, 0, 0);
|
||||
} else {
|
||||
inputParam = (data.command + 1) % 10;
|
||||
}
|
||||
@ -151,13 +149,16 @@ void IR_ParamEnter() {
|
||||
if(inputParam != NULL_NumberParam){
|
||||
print("Enter: ");
|
||||
printNumber(inputParam);
|
||||
// SetShiftReg_inline(0, 0, inputParam);
|
||||
onParamEnter();
|
||||
}
|
||||
inputParam = NULL_NumberParam;
|
||||
digitInputInProgerss = 0;
|
||||
break;
|
||||
|
||||
case IR_START:
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
IR_Home_Process();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user