diff --git a/driver/drv/b15f.cpp b/driver/drv/b15f.cpp index 18cc93b..fd11ab4 100644 --- a/driver/drv/b15f.cpp +++ b/driver/drv/b15f.cpp @@ -27,7 +27,8 @@ void B15F::init() std::cout << "OK" << std::endl; - // Temporärer Test + // Temporärer Test + /* uint8_t block[16]; while(1) { @@ -35,7 +36,7 @@ void B15F::init() usart.printStatistics(); usleep(1000); } - throw std::runtime_error("SCHLUSS"); + throw std::runtime_error("SCHLUSS");*/ @@ -44,11 +45,11 @@ void B15F::init() while(tries--) { // verwerfe Daten, die µC noch hat - discard(); + //discard(); if(!testConnection()) continue; - + if(!testIntConv()) continue; @@ -58,6 +59,7 @@ void B15F::init() throw DriverException("Verbindungstest fehlgeschlagen. Neueste Version im Einsatz?"); std::cout << "OK" << std::endl; + // Gib board info aus std::vector info = getBoardInfo(); std::cout << PRE << "AVR Firmware Version: " << info[0] << " um " << info[1] << " Uhr (" << info[2] << ")" << std::endl; @@ -104,7 +106,8 @@ bool B15F::testConnection() usart.writeByte(RQ_TEST); usart.writeByte(dummy); - + usart.writeByte(0x80); + uint8_t aw = usart.readByte(); uint8_t mirror = usart.readByte(); @@ -118,6 +121,7 @@ bool B15F::testIntConv() usart.writeByte(RQ_INT); usart.writeInt(dummy); + usart.writeByte(0x80); uint16_t aw = usart.readInt(); return aw == dummy * 3; @@ -129,6 +133,7 @@ std::vector B15F::getBoardInfo(void) std::vector info; usart.writeByte(RQ_INFO); + usart.writeByte(0x80); uint8_t n = usart.readByte(); while(n--) diff --git a/driver/drv/b15f.o b/driver/drv/b15f.o index bffe005..5860c8c 100644 Binary files a/driver/drv/b15f.o and b/driver/drv/b15f.o differ diff --git a/driver/main b/driver/main index 1fb9afc..2538000 100755 Binary files a/driver/main and b/driver/main differ