Skip to content

Commit

Permalink
Fixed issue where readexError wasn't being reset on each call into op…
Browse files Browse the repository at this point in the history
…_readex(), causing returns of errors from previous iterations.
  • Loading branch information
Boisy Pitre committed Sep 16, 2024
1 parent fd750ff commit 6ef37f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions lib/bus/drivewire/drivewire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ int systemBus::op_readex(std::vector<uint8_t> *q)
{
int result = 0;
readexChecksum = 0;
readexError = 0;

if (q->size() >= 5) {
uint8_t drive_num = q->at(1);
Expand Down Expand Up @@ -944,15 +945,10 @@ void systemBus::service()
}

int showDump = 1;

#ifdef ESP_PLATFORM
#else
uint64_t ms = fnSystem.millis();
#ifdef SUPER_DEBUGGING
if (ms % 100 == 0) {
Debug_printv("MS = %ld, lastInterruptMs = %ld, TIMER = %ld\n", ms, lastInterruptMs, (timerActive == true && ms - lastInterruptMs >= timerRate));
}
#endif
if (timerActive == true && ms - lastInterruptMs >= timerRate)
{
Debug_printv("State Reset Timer INVOKED!\n");
Expand Down
2 changes: 1 addition & 1 deletion lib/device/drivewire/fuji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ int drivewireFuji::net_get_ssid(std::vector<uint8_t> *q)
memset(&cfg, 0, sizeof(cfg));

/*
We memcpy instead of strcpy because technically the SSID and phasephras aren't strings and aren't null terminated,
We memcpy instead of strcpy because technically the SSID and phasephrase aren't strings and aren't null terminated,
they're arrays of bytes officially and can contain any byte value - including a zero - at any point in the array.
However, we're not consistent about how we treat this in the different parts of the code.
*/
Expand Down

0 comments on commit 6ef37f1

Please sign in to comment.