Clean up.

This commit is contained in:
mattbk 2023-09-14 12:46:35 -05:00
parent 73a6b694a9
commit a47cd1465a

View File

@ -69,7 +69,6 @@ int yourInputNtransmitters;
int step_length = 10000; // 10 secs int step_length = 10000; // 10 secs
int cycle_id = 1; // number of this transmitter in cycle int cycle_id = 1; // number of this transmitter in cycle
int n_transmitters = 2; //number of transmitters total int n_transmitters = 2; //number of transmitters total
long previousMillis = 0;
long start_millis = 0; long start_millis = 0;
long stop_millis = 0; long stop_millis = 0;
long pause_millis = 0; long pause_millis = 0;
@ -720,21 +719,16 @@ void loop() {
//morseToSend_blink.Reset().Update(); //morseToSend_blink.Reset().Update();
//morses_sequence_blink.Reset(); //morses_sequence_blink.Reset();
//Serial.println("Start up cycle"); //Serial.println("Start up cycle");
// if(currentMillis - previousMillis > step_length) {
if((millis() > start_millis) & (millis() < stop_millis)){ if((millis() > start_millis) & (millis() < stop_millis)){
// save the last time you started sending
// previousMillis = currentMillis;
if (!sender.continueSending()){ if (!sender.continueSending()){
// Set the internal counters to the message's beginning. // Set the internal counters to the message's beginning.
// Here, this results in repeating the message indefinitely. // Here, this results in repeating the message indefinitely.
sender.startSending(); sender.startSending();
} }
} else if((millis() > stop_millis) & (millis() < pause_millis)){ } else if((millis() > stop_millis) & (millis() < pause_millis)){
// do nothing // do nothing in this case -- in between cycles
} else if((millis() > pause_millis)){ } else if((millis() > pause_millis)){
startProgram = true; startProgram = true;
//start_millis = millis() + step_length;
//stop_millis = start_millis + step_length;
} }
// if the cycle program is not running // if the cycle program is not running
} else if((yourInputSend == 2) & (programRunning == false)){ } else if((yourInputSend == 2) & (programRunning == false)){