add capacity as fallback if energy_now and energy_full not defined in BatteryCharge

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Feb 3, 2026 at 12:45 UTC 67b849812aa5d812d20c08f40ac6ee9c04144d4b
1 file changed +1 -1
agents/modules_meshcore/computer-identifiers.js
+1 -1
@@ -426,7 +426,7 @@ function linux_identifiers()
426 "RemainingCapacity": toMilli(thedata.energy_now),
427 "Voltage": toMilli(thedata.voltage_now),
428 "Health": (thedata.energy_full && thedata.energy_full_design ? Math.floor((thedata.energy_full / thedata.energy_full_design) * 100) : 0),
429 - "BatteryCharge": (thedata.energy_now && thedata.energy_full ? Math.floor((thedata.energy_now / thedata.energy_full) * 100) : 0)
429 + "BatteryCharge": (thedata.energy_now && thedata.energy_full ? Math.floor((thedata.energy_now / thedata.energy_full) * 100) : (thedata.capacity ? thedata.capacity : 0))
430 };
431 values.battery.push(batteryJson);
432 }