Permalink
Browse files

...

  • Loading branch information...
1 parent afc95eb commit 064f34507273225ac14f095b8b1076473ff406c4 @thewknd committed Dec 7, 2011
Showing with 1 addition and 44 deletions.
  1. +0 −41 kellerbus.cpp
  2. +1 −3 kellerbus.h
View
@@ -74,47 +74,6 @@ byte CKellerBus::initDevice(byte Device)
return ret;
}
-byte CKellerBus::initDevice()
-{
- byte ret;
- unsigned long b=0;
-
-// Clear TxBuffer;
- for(b = 0; b < COMM_TX_MAX; b++) {
- TxBuffer[b] = 0;
- }
-
- TxBuffer[0] = cDevice;
- TxBuffer[1] = 0b01111111 & 48;
-
- if(TransferData(2,10) == COMM_OK) {
- cClass = RxBuffer[2];
- cGroup = RxBuffer[3];
- cYear = RxBuffer[4];
- cWeek = RxBuffer[5];
- cBuffer = RxBuffer[6];
- cState = RxBuffer[7];
- ret = COMM_OK;
- } else {
- // 2nd try for sleeping dcx
- delay(5);
- TxBuffer[0] = cDevice;
- TxBuffer[1] = 0b01111111 & 48;
- if(TransferData(2,10) == COMM_OK) {
- cClass = RxBuffer[2];
- cGroup = RxBuffer[3];
- cYear = RxBuffer[4];
- cWeek = RxBuffer[5];
- cBuffer = RxBuffer[6];
- cState = RxBuffer[7];
- ret = COMM_OK;
- } else {
- ret = COMM_ERR_BAD_CRC;
- }
- }
-
- return ret;
-}
byte CKellerBus::readSerialnumber()
{
byte ret;
View
@@ -52,11 +52,9 @@ class CKellerBus
float chT;
- public:
-
+ public:
CKellerBus(HardwareSerial* mComm, unsigned long pBaudrate, byte RTS);
- byte initDevice();
byte initDevice(byte Device);
byte readChannel(byte Channel);
byte readSerialnumber();

0 comments on commit 064f345

Please sign in to comment.