mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-05-04 07:10:16 +00:00
delay TX
This commit is contained in:
parent
b6e181f7b6
commit
3f29b8f596
@ -193,6 +193,9 @@ void setup() {
|
||||
bool testLed = false;
|
||||
uint32_t testLed_timer;
|
||||
|
||||
bool responsponse_f = false;
|
||||
uint32_t responsponse_tim;;
|
||||
|
||||
void loop() {
|
||||
// digitalToggle(LoopOut);
|
||||
Timer::tick();
|
||||
@ -230,7 +233,11 @@ void loop() {
|
||||
if(testLed && millis() - testLed_timer > 100){
|
||||
testLed=false;
|
||||
digitalWrite(12, LOW);
|
||||
}
|
||||
|
||||
if(responsponse_f && millis() - responsponse_tim > 100) {
|
||||
responsponse_f=false;
|
||||
encForward.sendData(IR_Broadcast, cmd_oar_car);
|
||||
}
|
||||
|
||||
}
|
||||
@ -239,7 +246,6 @@ void loop() {
|
||||
|
||||
|
||||
|
||||
|
||||
//test
|
||||
void status(IR_Decoder& dec) {
|
||||
if (dec.gotData.available() && dec.gotData.getAddrFrom() != 42) {
|
||||
@ -248,8 +254,8 @@ void status(IR_Decoder& dec) {
|
||||
testLed = true;
|
||||
testLed_timer = millis();
|
||||
|
||||
encForward.sendData(IR_Broadcast, cmd_oar_car);
|
||||
|
||||
responsponse_f = true;
|
||||
responsponse_tim = testLed_timer;
|
||||
|
||||
String str;
|
||||
if (/* dec.gotData.getDataPrt()[1] */1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user