feat: Support for 8s Cell Sensor such as FrSky FLVS ADV (#2302)

* first commit for FrSky 8s Lipo Sensor

FLVS Advanced transfers up to 8 cell voltages for Cels sensor

* correcting mistake made transferring local change to PR

* complementary extension of Companion telemetry simulator to enable simulation of  8 cells

* change to allow selection of cells 7 and 8 in calculated sensor with formula Cell

* (cpn) Add bin and yml conversions and basic semantic version helper

Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
Michael
2022-09-27 20:06:26 +10:00
committed by GitHub
co-authored by elecpower
parent 513578643c
commit 73861554ec
27 changed files with 255 additions and 22 deletions
+4 -3
View File
@@ -171,19 +171,20 @@ class TelemetrySimulator : public QWidget
class FlvssEmulator
{
public:
uint32_t setAllCells_GetNextPair(double cellValues[6]);
static const uint32_t MAXCELLS = 6;
static const uint32_t MAXCELLS = 8;
uint32_t setAllCells_GetNextPair(double cellValues[MAXCELLS]);
private:
void encodeAllCells();
void splitIntoCells(double totalVolts);
static uint32_t encodeCellPair(uint8_t cellNum, uint8_t firstCellNo, double cell1, double cell2);
double cellFloats[6];
double cellFloats[MAXCELLS];
uint32_t nextCellNum;
uint32_t numCells;
uint32_t cellData1;
uint32_t cellData2;
uint32_t cellData3;
uint32_t cellData4;
}; // FlvssEmulator
class GPSEmulator