Skip to content

Commit

Permalink
SNMP fixes for uC
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Nov 7, 2024
1 parent 59aa2d7 commit e6a6654
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions microcontrollers/main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ namespace qn = qindesign::network;
#include "snmp/snmp.h"


bool ota_update = false;
std::atomic_bool stop { false };
char name[24] { 0 };
backend *bs { nullptr };
scsi *scsi_dev { nullptr };
bool ota_update { false };
char name[24] { 0 };
backend *bs { nullptr };
scsi *scsi_dev { nullptr };
backend_stats_t bstats { };
std::atomic_bool stop { false };

#if defined(WT_ETH01)
int led_green = -1;
Expand Down Expand Up @@ -393,6 +394,9 @@ void loopw(void *)

ram_free_kb = get_free_heap_space() / 1024; // in kB

bs->get_and_reset_stats(&bstats);
bstats.io_wait_ticks = bstats.io_wait * 10000;

cu_count = 0;
}
}
Expand Down Expand Up @@ -643,7 +647,7 @@ void setup() {
#endif

draw_status(13);
init_snmp(&snmp_, &snmp_data_, &is, get_diskspace, bs, &cpu_usage, &ram_free_kb, &stop, 161);
init_snmp(&snmp_, &snmp_data_, &is, get_diskspace, bs, &bstats, &cpu_usage, &ram_free_kb, &stop, 161);

draw_status(14);
if (bs->begin() == false) {
Expand Down

0 comments on commit e6a6654

Please sign in to comment.