From d623fe5a1bbe02d680094eae5c16cdc83732a984 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 4 Mar 2024 06:18:26 -0700 Subject: d3aa: fixed voltage measurement --- hw/hank/emisar-d3aa/hwdef.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/hank/emisar-d3aa/hwdef.c') diff --git a/hw/hank/emisar-d3aa/hwdef.c b/hw/hank/emisar-d3aa/hwdef.c index 5f41d9d..a963bc2 100644 --- a/hw/hank/emisar-d3aa/hwdef.c +++ b/hw/hank/emisar-d3aa/hwdef.c @@ -113,7 +113,7 @@ uint8_t voltage_raw2cooked(uint16_t measurement) { // (plus a bit of fudging to fix the slope and offset, // based on measuring actual hardware) uint8_t result = (uint32_t)(measurement + (65535 * 4 / 1024)) - * 43 / 16128; + * 43 / 16000; return result; } #endif -- cgit v1.2.3