From bc792a8655821f57297d8a4c539e4d63a946f2d9 Mon Sep 17 00:00:00 2001 From: Charles Papon Date: Sat, 15 Jul 2017 19:05:34 +0200 Subject: [PATCH] Fix UartRx sim --- src/test/cpp/briey/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/cpp/briey/main.cpp b/src/test/cpp/briey/main.cpp index aaef9c3..601e2ee 100644 --- a/src/test/cpp/briey/main.cpp +++ b/src/test/cpp/briey/main.cpp @@ -689,8 +689,8 @@ public: uint32_t counter; virtual void tick(uint64_t time){ if(time < holdTime){ - if(*rx != holdValue){ - cout << "UART RX FRAME ERROR" << endl; + if(*rx != holdValue && time + (uartTimeRate>>7) < holdTime){ + cout << "UART RX FRAME ERROR at " << time << endl; holdTime = time; state = START; } @@ -831,7 +831,7 @@ public: } void refresh(){ - cout << "Display refresh " << refreshCounter++ << endl; + //cout << "Display refresh " << refreshCounter++ << endl; SDL_UpdateTexture(texture, NULL, pixels, 640 * sizeof(Uint32)); SDL_RenderClear(renderer); SDL_RenderCopy(renderer, texture, NULL, NULL);