[PATCH 2/3] Add EON Steel dive mode and transmitter ID information

Linus Torvalds torvalds at linux-foundation.org
Sat Jan 3 15:28:18 PST 2015


From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Sat, 3 Jan 2015 14:43:46 -0800
Subject: [PATCH 2/3] Add EON Steel dive mode and transmitter ID information

This adds the divemode name (Nitrox, Trimix, Gauge, or whatever custon
name) and the transmitter ID as extra string information when
downloading from the EON Steel.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

Patch 1/3 was the "Add EON Steel gas change event parsing" patch I sent 
yesterday, but it hasn't changed and I'm not resending it here, so if you 
wonder why you only get 2/3 and 3/3, that's why.

Holler if you don't see yesterday's patch, and I'll send that one too.

 src/suunto_eonsteel_parser.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c
index d5bfb0e74942..368769675e0f 100644
--- a/src/suunto_eonsteel_parser.c
+++ b/src/suunto_eonsteel_parser.c
@@ -569,6 +569,9 @@ static int traverse_header_fields(suunto_eonsteel_parser_t *eon, const char *nam
 	if (!strcmp(name, "Diving.Algorithm"))
 		return add_string(eon, "Deco algorithm", data);
 
+	if (!strcmp(name, "Diving.DiveMode"))
+		return add_string(eon, "Dive Mode", data);
+
 	return 0;
 }
 
@@ -614,6 +617,9 @@ static int traverse_fields(unsigned short type, const struct type_desc *desc, co
 	case 0x000f: // Helium percentage in first byte
 		add_gas_he(eon, data[0]);
 		break;
+	case 0x0011: // Transmitter ID
+		add_string(eon, "Transmitter ID", data);
+		break;
 	default:
 	// The types with the high byte set seem to be dynamic
 	// although not all of them seem to change. But let's
-- 
2.2.1.212.gc5b9256



More information about the devel mailing list