Ajout de l'attribut privée tension afin de corriger une erreur de calcule
This commit is contained in:
parent
0927059d4e
commit
e186bf16d1
@ -11,6 +11,7 @@ class MeasureUnit
|
||||
enum ERROR {OK = 0, MALLOC_ERR = 1};
|
||||
MeasureUnit(uint8_t *analogInput, uint16_t thermistorCount, uint64_t precResistor, ThermistorSetting thermistorSetting, Adc &adc);
|
||||
~MeasureUnit();
|
||||
void init(){_adc.begin();}
|
||||
void setGlobalTempOffset(double offset);
|
||||
void levelTemperaturesOff();
|
||||
double getGlobalTempOffset();
|
||||
@ -46,7 +47,7 @@ class MeasureUnit
|
||||
//Async part
|
||||
STATE _state;
|
||||
uint8_t _channel;
|
||||
double _courant;
|
||||
double _courant, _tension;
|
||||
boolean _triggerLevelOff; //Attribut permettant de savoir si un étalonnage a été demandé
|
||||
};
|
||||
|
||||
|
@ -5,6 +5,7 @@ PayloadFormatter::PayloadFormatter(uint8_t numOfRow, uint8_t numOfColumn) : _tot
|
||||
_length = numOfRow * numOfColumn * 2 + 7 + 1;
|
||||
_payload = (uint8_t *) calloc(_length, sizeof(uint8_t));
|
||||
}
|
||||
|
||||
PayloadFormatter::~PayloadFormatter()
|
||||
{
|
||||
free(_payload);
|
||||
@ -24,7 +25,7 @@ boolean PayloadFormatter::endSession()
|
||||
return ret;
|
||||
}
|
||||
|
||||
int16_t PayloadFormatter::buildPayload(uint8_t **buffer, DateTime *dateTime, double *tempArray)
|
||||
int16_t PayloadFormatter::buildPayload(uint8_t **buffer, DateTime *dateTime, double *tempArray, uint8_t numOfRow, uint8_t numOfColumn)
|
||||
{
|
||||
*buffer = _payload;
|
||||
if(_currentPayload == _totalPayloads || !_totalPayloads)
|
||||
|
@ -9,7 +9,7 @@ class PayloadFormatter
|
||||
PayloadFormatter(uint8_t numOfRow, uint8_t numOfColumn);
|
||||
~PayloadFormatter();
|
||||
|
||||
int16_t buildPayload(uint8_t **buffer, DateTime *dateTime, double *tempArray);
|
||||
int16_t buildPayload(uint8_t **buffer, DateTime *dateTime, double *tempArray, uint8_t numOfRow = -1, uint8_t numOfColumn = -1);
|
||||
void startSession(uint8_t totalPackets);
|
||||
boolean endSession();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user