mirror of
https://github.com/okalachev/flix.git
synced 2026-06-27 21:46:38 +00:00
Improve voltage measurement
Apply PWM_VOLT_PIN without reboot. Check if the voltage pin can be used with ADC when setting up. Set voltage to NAN, when it's unknown (including pyflix). pyflix@0.15. Don't send BATTERY_STATUS when voltage is unknown. Add dummy voltage to the simulator.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
import os
|
||||
import time
|
||||
import math
|
||||
from queue import Queue, Empty
|
||||
from typing import Optional, Callable, List, Dict, Any, Union, Sequence
|
||||
import logging
|
||||
@@ -26,7 +27,7 @@ class Flix:
|
||||
mode: str = ''
|
||||
armed: bool = False
|
||||
landed: bool = False
|
||||
voltage: float = 0
|
||||
voltage: float = math.nan
|
||||
attitude: List[float]
|
||||
attitude_euler: List[float] # roll, pitch, yaw
|
||||
rates: List[float]
|
||||
|
||||
Reference in New Issue
Block a user