diff --git a/esl_blaster/FW/Release/ESLBlaster.bin b/esl_blaster/FW/Release/ESLBlaster.bin index de57e70..bd037eb 100644 Binary files a/esl_blaster/FW/Release/ESLBlaster.bin and b/esl_blaster/FW/Release/ESLBlaster.bin differ diff --git a/esl_blaster/FW/Src/main.c b/esl_blaster/FW/Src/main.c index 98ef5ae..1e90d35 100644 --- a/esl_blaster/FW/Src/main.c +++ b/esl_blaster/FW/Src/main.c @@ -26,7 +26,7 @@ volatile uint32_t SymbolCounter; volatile uint32_t TickCounter, Burst, Repeats, ErrorAcc; volatile uint8_t SendOperationReady = 0, CurrentByte, Symbol; volatile const uint8_t * FrameData; -volatile uint32_t comm_reset_flag = 0; +volatile uint32_t comm_reset_flag = 0, ram_frame_repeat_delay = 0; /* static const uint8_t frame_wakeup[30] = { @@ -94,7 +94,7 @@ void TIM16_IRQHandler(void) { ByteSentCounter = 0; SymbolCounter = 0; ErrorAcc = 0; - TickCounter = 2000; + TickCounter = ram_frame_repeat_delay * 50; //2000; } else { SendOperationReady = 0; // RED LED OFF @@ -141,6 +141,7 @@ int main(void) { enum comm_states { STATE_IDLE, STATE_GET_FRAME_SIZE, + STATE_GET_FRAME_REPEAT_DELAY, STATE_GET_FRAME_REPEATS, STATE_GET_FRAME_DATA }; @@ -268,6 +269,9 @@ int main(void) { } } else if (comm_state == STATE_GET_FRAME_SIZE) { ram_frame_size = byte; + comm_state = STATE_GET_FRAME_REPEAT_DELAY; + } else if (comm_state == STATE_GET_FRAME_REPEAT_DELAY) { + ram_frame_repeat_delay = byte; comm_state = STATE_GET_FRAME_REPEATS; } else if (comm_state == STATE_GET_FRAME_REPEATS) { ram_frame_repeats = byte; diff --git a/tx.py b/tx.py index 3253f62..9739f14 100644 --- a/tx.py +++ b/tx.py @@ -62,6 +62,7 @@ def transmit_esl_blaster(frames, port): ba = bytearray() ba.append('L') ba.append(data_size) + ba.append(40) # 40*50 = 2000 timer ticks between repeats ba.append(repeats) for b in range(0, len(fr) - 1): ba.append(fr[b])