Skip to content

Commit

Permalink
💀 PROS 4: Remove dead VDML logging code (#519)
Browse files Browse the repository at this point in the history
* Disable VDML error logging code

* Update VDML header
  • Loading branch information
Richard-Stump authored Feb 22, 2023
1 parent ba8804a commit cbd4e0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 0 additions & 5 deletions include/vdml/vdml.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ void vdml_unset_port_error(uint8_t port);
*/
bool vdml_get_port_error(uint8_t port);

/**
* Reset all ports' error bits.
*/
void vdml_reset_port_error();

/**
* Claims the mutex for the given port.
*
Expand Down
11 changes: 10 additions & 1 deletion src/devices/vdml.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ bool vdml_get_port_error(uint8_t port) {
}
}

#if 0
void vdml_reset_port_error() {
port_errors = 0;
}
#endif

/**
* Background processing function for the VDML system.
Expand All @@ -161,17 +163,23 @@ void vdml_reset_port_error() {
* On warnings, no operation is performed.
*/
void vdml_background_processing() {

// We're not removing this outright since we want to revisit the idea of logging
// the errors with devices in the future
#if 0
static int32_t last_port_errors = 0;
static int cycle = 0;
cycle++;
if (cycle % 5000 == 0) {
vdml_reset_port_error();
last_port_errors = 0;
}
#endif

// Refresh actual device types
// Refresh actual device types.
registry_update_types();

#if 0
// Validate the ports. Warn if mismatch.
uint8_t error_arr[NUM_V5_PORTS];
int num_errors = 0;
Expand Down Expand Up @@ -257,4 +265,5 @@ void vdml_background_processing() {
end_render_errors:
last_port_errors = port_errors;
}
#endif
}

0 comments on commit cbd4e0a

Please sign in to comment.