Fix overvoltage detection for electrical test version
authorNathael Pajani <nathael.pajani@ed3l.fr>
Fri, 24 Nov 2023 22:57:05 +0000 (23:57 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Fri, 24 Nov 2023 22:57:05 +0000 (23:57 +0100)
tests_elec/main.c

index cdf3b49..1f649c3 100644 (file)
@@ -322,7 +322,7 @@ void mode_update(void)
        temp_shutdown = (gpio_read(overtemperature_pin) ? 0 : 1);
        /* Update Over-Voltage information */
        if (overvoltage > 0) {
-               uint8_t ov_tmp = (gpio_read(overvoltage_pin) ? 0 : 1);
+               uint8_t ov_tmp = (gpio_read(overvoltage_pin) ? 1 : 0);
                if (ov_tmp == 0) {
                        overvoltage--;
                }