aboutsummaryrefslogtreecommitdiff
path: root/hw/hank/emisar-d3aa/hwdef.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2024-03-04 06:18:26 -0700
committerSelene ToyKeeper2024-03-04 06:18:26 -0700
commitd623fe5a1bbe02d680094eae5c16cdc83732a984 (patch)
tree5bd830670b5d29ff3324447971eec79ee22009b2 /hw/hank/emisar-d3aa/hwdef.c
parentMerge branch 'trunk' into emisar-d3aa (diff)
downloadanduril-d623fe5a1bbe02d680094eae5c16cdc83732a984.tar.gz
anduril-d623fe5a1bbe02d680094eae5c16cdc83732a984.tar.bz2
anduril-d623fe5a1bbe02d680094eae5c16cdc83732a984.zip
d3aa: fixed voltage measurement
Diffstat (limited to 'hw/hank/emisar-d3aa/hwdef.c')
-rw-r--r--hw/hank/emisar-d3aa/hwdef.c2
1 files changed, 1 insertions, 1 deletions
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