mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-27 04:33:04 +00:00
KMP stuff
This commit is contained in:
@@ -82,7 +82,7 @@ ADC_MODE(ADC_VCC);
|
||||
|
||||
#include "MeterCommunicator.h"
|
||||
#include "PassiveMeterCommunicator.h"
|
||||
//#include "KmpCommunicator.h"
|
||||
#include "KmpCommunicator.h"
|
||||
#include "PulseMeterCommunicator.h"
|
||||
|
||||
#include "Uptime.h"
|
||||
@@ -175,7 +175,7 @@ RealtimePlot rtp;
|
||||
|
||||
MeterCommunicator* mc = NULL;
|
||||
PassiveMeterCommunicator* passiveMc = NULL;
|
||||
//KmpCommunicator* kmpMc = NULL;
|
||||
KmpCommunicator* kmpMc = NULL;
|
||||
PulseMeterCommunicator* pulseMc = NULL;
|
||||
|
||||
bool networkConnected = false;
|
||||
@@ -264,11 +264,9 @@ void rxerr(int err) {
|
||||
if(passiveMc != NULL) {
|
||||
passiveMc->rxerr(err);
|
||||
}
|
||||
/*
|
||||
if(kmpMc != NULL) {
|
||||
kmpMc->rxerr(err);
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -745,12 +743,10 @@ void loop() {
|
||||
delete pulseMc;
|
||||
pulseMc = NULL;
|
||||
}
|
||||
/*
|
||||
if(kmpMc != NULL) {
|
||||
delete(kmpMc);
|
||||
kmpMc = NULL;
|
||||
}
|
||||
*/
|
||||
if(passiveMc == NULL) {
|
||||
passiveMc = new PassiveMeterCommunicator(&Debug);
|
||||
}
|
||||
@@ -758,7 +754,6 @@ void loop() {
|
||||
hwSerial = passiveMc->getHwSerial();
|
||||
mc = passiveMc;
|
||||
break;
|
||||
/*
|
||||
case METER_PARSER_KAMSTRUP:
|
||||
if(pulseMc != NULL) {
|
||||
delete pulseMc;
|
||||
@@ -775,14 +770,11 @@ void loop() {
|
||||
hwSerial = kmpMc->getHwSerial();
|
||||
mc = kmpMc;
|
||||
break;
|
||||
*/
|
||||
case METER_PARSER_PULSE:
|
||||
/*
|
||||
if(kmpMc != NULL) {
|
||||
delete(kmpMc);
|
||||
kmpMc = NULL;
|
||||
}
|
||||
*/
|
||||
if(passiveMc != NULL) {
|
||||
delete(passiveMc);
|
||||
passiveMc = NULL;
|
||||
|
||||
@@ -31,5 +31,7 @@ private:
|
||||
bool readPacket();
|
||||
int16_t unwrapData(uint8_t *buf, DataParserContext &context);
|
||||
uint8_t stuff(uint8_t* buf, uint8_t len);
|
||||
uint8_t unstuff(uint8_t* buf, uint8_t len);
|
||||
void send(uint8_t* buf, uint8_t len);
|
||||
double convertvalue(uint32_t val, uint8_t unit, uint8_t siex);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user