Skip to content

Commit

Permalink
Fix #94
Browse files Browse the repository at this point in the history
  • Loading branch information
keesverruijt committed Sep 24, 2017
1 parent ff16529 commit 8955d23
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 31 deletions.
13 changes: 6 additions & 7 deletions analyzer/pgn.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ along with CANboat. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>

#define UINT16_OUT_OF_RANGE (MAX_UINT16 - 1)
#define UINT16_UNKNOWN (MAX_UINT16)
Expand Down Expand Up @@ -1094,8 +1094,7 @@ Pgn pgnList[] =
{ { "Manufacturer Code", 11, RES_MANUFACTURER, false, "=140", "Lowrance" }
, { "Reserved", 2, RES_NOTUSED, false, 0, "" }
, { "Industry Code", 3, RES_LOOKUP, false, "=4", "Marine Industry" }
, { "Temperature Instance", 4, 1, false, 0, "" }
, { "Temperature Source", 4, 1, false, 0, "" }
, { "Temperature Source", BYTES(1), RES_LOOKUP, false, LOOKUP_TEMPERATURE_SOURCE, "" }
, { "Actual Temperature", BYTES(2), RES_TEMPERATURE, false, "K", "" }
, { 0 }
}
Expand Down Expand Up @@ -1198,7 +1197,7 @@ Pgn pgnList[] =
{ { "Manufacturer Code", 11, RES_MANUFACTURER, false, "=1851", "Raymarine" }
, { "Reserved", 2, RES_NOTUSED, false, 0, "" }
, { "Industry Code", 3, RES_LOOKUP, false, "=4", "Marine Industry" }
, { "Wind Datum", BYTES(2), RES_RADIANS, false, "rad", "" }
, { "Wind Datum", BYTES(2), RES_RADIANS, false, "rad", "" }
, { "Rolling Average Wind Angle", BYTES(2), RES_RADIANS, false, "rad", "" }
, { "Reserved", BYTES(2), 1, false, 0, "" }
}
Expand All @@ -1209,7 +1208,7 @@ Pgn pgnList[] =
, { "Reserved", 2, RES_NOTUSED, false, 0, "" }
, { "Industry Code", 3, RES_LOOKUP, false, "=4", "Marine Industry" }
, { "SID", BYTES(1), RES_BINARY, false, 0, "" }
, { "Heading True", BYTES(2), RES_RADIANS, false, "rad", "" }
, { "Heading True", BYTES(2), RES_RADIANS, false, "rad", "" }
, { "Heading Magnetic", BYTES(2), RES_RADIANS, false, "rad", "" }
, { "Reserved", BYTES(1), 1, false, 0, "" }
}
Expand Down Expand Up @@ -1272,7 +1271,7 @@ Pgn pgnList[] =
, { "Pilot Mode", BYTES(1), RES_BINARY, false, 0, "" }
, { "Sub Mode", BYTES(1), RES_BINARY, false, 0, "" }
, { "Pilot Mode Data", BYTES(1), RES_BINARY, false, 0, "" }
, { "Reserved", BYTES(3), RES_BINARY, false, 0, "" }
, { "Reserved", BYTES(3), RES_BINARY, false, 0, "" }
}
}
/* http://www.airmartechnology.com/uploads/installguide/DST200UserlManual.pdf */
Expand Down Expand Up @@ -3991,7 +3990,7 @@ Pgn pgnList[] =
, { "Industry Code", 3, RES_LOOKUP, false, "=4", "Marine Industry" }
, { "Message ID", BYTES(1), 1, false, "=45", "Zone Name" }
, { "A", BYTES(1), 1, false, 0, "" }
, { "Number", BYTES(1), 1, false, 0, "" }
, { "Number", BYTES(1), 1, false, 0, "" }
, { "Name", BYTES(13), RES_STRINGLZ, false, 0, "" }
, { 0 }
}
Expand Down
33 changes: 21 additions & 12 deletions analyzer/pgns.json
Original file line number Diff line number Diff line change
Expand Up @@ -2162,22 +2162,31 @@
"Signed":false},
{
"Order":4,
"Id":"temperatureInstance",
"Name":"Temperature Instance",
"BitLength":4,
"Id":"temperatureSource",
"Name":"Temperature Source",
"BitLength":8,
"BitOffset":16,
"BitStart":0,
"Signed":false},
"Type":"Lookup table",
"Signed":false,
"EnumValues":[
{"name":"Sea Temperature","value":"0"},
{"name":"Outside Temperature","value":"1"},
{"name":"Inside Temperature","value":"2"},
{"name":"Engine Room Temperature","value":"3"},
{"name":"Main Cabin Temperature","value":"4"},
{"name":"Live Well Temperature","value":"5"},
{"name":"Bait Well Temperature","value":"6"},
{"name":"Refridgeration Temperature","value":"7"},
{"name":"Heating System Temperature","value":"8"},
{"name":"Dew Point Temperature","value":"9"},
{"name":"Apparent Wind Chill Temperature","value":"10"},
{"name":"Theoretical Wind Chill Temperature","value":"11"},
{"name":"Heat Index Temperature","value":"12"},
{"name":"Freezer Temperature","value":"13"},
{"name":"Exhaust Gas Temperature","value":"14"}]},
{
"Order":5,
"Id":"temperatureSource",
"Name":"Temperature Source",
"BitLength":4,
"BitOffset":20,
"BitStart":4,
"Signed":false},
{
"Order":6,
"Id":"actualTemperature",
"Name":"Actual Temperature",
"BitLength":16,
Expand Down
33 changes: 21 additions & 12 deletions analyzer/pgns.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2471,24 +2471,33 @@ along with CANboat. If not, see <http://www.gnu.org/licenses/>.
</Field>
<Field>
<Order>4</Order>
<Id>temperatureInstance</Id>
<Name>Temperature Instance</Name>
<BitLength>4</BitLength>
<Id>temperatureSource</Id>
<Name>Temperature Source</Name>
<BitLength>8</BitLength>
<BitOffset>16</BitOffset>
<BitStart>0</BitStart>
<Type>Lookup table</Type>
<Signed>false</Signed>
<EnumValues>
<EnumPair Value='0' Name='Sea Temperature' />
<EnumPair Value='1' Name='Outside Temperature' />
<EnumPair Value='2' Name='Inside Temperature' />
<EnumPair Value='3' Name='Engine Room Temperature' />
<EnumPair Value='4' Name='Main Cabin Temperature' />
<EnumPair Value='5' Name='Live Well Temperature' />
<EnumPair Value='6' Name='Bait Well Temperature' />
<EnumPair Value='7' Name='Refridgeration Temperature' />
<EnumPair Value='8' Name='Heating System Temperature' />
<EnumPair Value='9' Name='Dew Point Temperature' />
<EnumPair Value='10' Name='Apparent Wind Chill Temperature' />
<EnumPair Value='11' Name='Theoretical Wind Chill Temperature' />
<EnumPair Value='12' Name='Heat Index Temperature' />
<EnumPair Value='13' Name='Freezer Temperature' />
<EnumPair Value='14' Name='Exhaust Gas Temperature' />
</EnumValues>
</Field>
<Field>
<Order>5</Order>
<Id>temperatureSource</Id>
<Name>Temperature Source</Name>
<BitLength>4</BitLength>
<BitOffset>20</BitOffset>
<BitStart>4</BitStart>
<Signed>false</Signed>
</Field>
<Field>
<Order>6</Order>
<Id>actualTemperature</Id>
<Name>Actual Temperature</Name>
<BitLength>16</BitLength>
Expand Down
12 changes: 12 additions & 0 deletions samples/lowrance-65285.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
1969-12-31T16:00:34.206,0,65285,0,0,9,8c,80,00,a1,72,ff,ff,ff,9e
1969-12-31T16:00:34.287,0,65285,0,0,9,8c,80,01,a1,72,ff,ff,ff,92
1969-12-31T16:00:34.329,0,65285,0,0,9,8c,80,02,a1,72,ff,ff,ff,b0
1969-12-31T16:36:21.165,0,65285,0,0,9,8c,80,03,69,73,ff,ff,ff,00
1969-12-31T16:37:30.297,0,65285,0,0,9,8c,80,03,0f,73,ff,ff,ff,00
1969-12-31T16:00:34.367,0,65285,0,0,9,8c,80,04,a1,72,ff,ff,ff,13
1969-12-31T16:00:34.420,0,65285,0,0,9,8c,80,05,a1,72,ff,ff,ff,1c
1969-12-31T16:00:34.474,0,65285,0,0,9,8c,80,06,a1,72,ff,ff,ff,60
1969-12-31T16:00:34.572,0,65285,0,0,9,8c,80,07,ab,72,ff,ff,ff,ff
1969-12-31T16:00:34.611,0,65285,0,0,9,8c,80,08,a1,72,ff,ff,ff,e4
1969-12-31T16:00:34.646,0,65285,0,0,9,8c,80,ff,a1,72,ff,ff,ff,ff

0 comments on commit 8955d23

Please sign in to comment.