Skip to content

Commit

Permalink
INTG-1575: Add ignition status to vss and model garage (#120)
Browse files Browse the repository at this point in the history
- updated model garage with compass ignition and headings fields
  • Loading branch information
zakharenkodmytro authored Feb 24, 2025
1 parent e85f98e commit 8bbcf8e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.24
replace github.com/redpanda-data/benthos/v4 => github.com/DIMO-Network/benthos/v4 v4.0.0-20250123192050-6af7fb655e87

require (
github.com/DIMO-Network/model-garage v0.4.10-0.20250219214418-8eed2b6a7b0f
github.com/DIMO-Network/model-garage v0.4.11
github.com/DIMO-Network/nameindexer v0.1.2
github.com/ethereum/go-ethereum v1.14.13
github.com/redpanda-data/benthos/v4 v4.43.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ github.com/ClickHouse/clickhouse-go/v2 v2.30.1 h1:Dy0n0l+cMbPXs8hFkeeWGaPKrB+MDB
github.com/ClickHouse/clickhouse-go/v2 v2.30.1/go.mod h1:szk8BMoQV/NgHXZ20ZbwDyvPWmpfhRKjFkc6wzASGxM=
github.com/DIMO-Network/benthos/v4 v4.0.0-20250123192050-6af7fb655e87 h1:0qWA5eC7sZjQN/kXguX/+zqDe8ebK+aGQMP8+eUEeY8=
github.com/DIMO-Network/benthos/v4 v4.0.0-20250123192050-6af7fb655e87/go.mod h1:2dUKS2373CZQ5lzp1qm6XflDhlm1mbhMGXBVoEuZMFQ=
github.com/DIMO-Network/model-garage v0.4.10-0.20250219214418-8eed2b6a7b0f h1:vloni/5dUYFsUWnP+58Lv8v5SbnmUuY1wAti0a4iLUE=
github.com/DIMO-Network/model-garage v0.4.10-0.20250219214418-8eed2b6a7b0f/go.mod h1:qDCcVsJ//KfYNwElttRCJmwywZnWLp55RwSc0jFKAXI=
github.com/DIMO-Network/model-garage v0.4.11 h1:y6J4zbx0bGZXPYOKsOaEGfzAebv7GJh+VPNXX7gYwHU=
github.com/DIMO-Network/model-garage v0.4.11/go.mod h1:qDCcVsJ//KfYNwElttRCJmwywZnWLp55RwSc0jFKAXI=
github.com/DIMO-Network/nameindexer v0.1.2 h1:xar3D+fe7RFy887BVWh+B1qhUo/K6tIzK3Ld1NTuRgo=
github.com/DIMO-Network/nameindexer v0.1.2/go.mod h1:BmonIrd69A4Whe+7WHiyTP6RJf3KQiooOLBISqkeyII=
github.com/DIMO-Network/tesla-vss v0.0.0-20250214202426-020776dd68b5 h1:78RxirTdA5zMN5yAR2RxGQSFL1tV9p1LM76F+WJBWm0=
Expand Down
14 changes: 12 additions & 2 deletions internal/modules/compass/compass_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,20 @@ func TestSignalConvert(t *testing.T) {
Data: json.RawMessage(signalData),
},
expectedSignals: []vss.Signal{
{TokenID: 37, Timestamp: ts, Name: vss.FieldCurrentLocationAltitude, ValueNumber: 277.100006, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldChassisAxleRow1WheelLeftTirePressure, ValueNumber: 282.68516, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldChassisAxleRow1WheelRightTirePressure, ValueNumber: 282.68516, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldChassisAxleRow2WheelLeftTirePressure, ValueNumber: 289.57992, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldChassisAxleRow2WheelRightTirePressure, ValueNumber: 282.68516, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldCurrentLocationLatitude, ValueNumber: 34.878016, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldCurrentLocationLongitude, ValueNumber: -82.223566, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldCurrentLocationAltitude, ValueNumber: 277.100006, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldCurrentLocationHeading, ValueNumber: 16, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldIsIgnitionOn, ValueNumber: 0, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldLowVoltageBatteryCurrentVoltage, ValueNumber: 13, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldPowertrainCombustionEngineECT, ValueNumber: 92, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldPowertrainCombustionEngineEOP, ValueNumber: 4, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldPowertrainCombustionEngineEOT, ValueNumber: 89, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldPowertrainCombustionEngineSpeed, ValueNumber: 0, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldPowertrainFuelSystemAbsoluteLevel, ValueNumber: 113.85, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldPowertrainFuelSystemRelativeLevel, ValueNumber: 99, Source: compassConnection},
{TokenID: 37, Timestamp: ts, Name: vss.FieldPowertrainTransmissionTravelledDistance, ValueNumber: 20446, Source: compassConnection},
Expand All @@ -191,7 +201,7 @@ func TestSignalConvert(t *testing.T) {
require.Contains(t, err.Error(), tt.expectedError.Error())
} else {
require.NoError(t, err)
require.Equal(t, tt.expectedSignals, signals)
assert.ElementsMatch(t, signals, tt.expectedSignals)
}
})
}
Expand Down

0 comments on commit 8bbcf8e

Please # to comment.