[PATCH 1/4] Cochran: Fixed location and encoding of CmdrII pointers

John Van Ostrand john at vanostrand.com
Fri Jun 30 11:12:56 PDT 2017


Commander II pointers to profile ringbuffer data was wrong.
After seeing the Commander I encoding I realized the Commander II
encoding of RB pointers was in a flipped word big endian format.
It only appeared to be in normal big endian format because of an
adjacent pointer that usually shared the same first two bytes.
---
 src/cochran_commander.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cochran_commander.c b/src/cochran_commander.c
index 27ed67d..3f084d3 100644
--- a/src/cochran_commander.c
+++ b/src/cochran_commander.c
@@ -147,11 +147,11 @@ static const cochran_device_layout_t cochran_cmdr_1_device_layout = {
 static const cochran_device_layout_t cochran_cmdr_device_layout = {
 	COCHRAN_MODEL_COMMANDER_AIR_NITROX, // model
 	24,         // address_bits
-	ENDIAN_BE,  // endian
+	ENDIAN_WORD_BE,  // endian
 	115200,     // baudrate
 	0x046,      // cf_dive_count
-	0x06E,      // cf_last_log
-	0x200,      // cf_last_interdive
+	0x070,      // cf_last_log
+	0x06C,      // cf_last_interdive
 	0x0AA,      // cf_serial_number
 	0x00000000, // rb_logbook_begin
 	0x00020000, // rb_logbook_end
-- 
2.4.11



More information about the devel mailing list