Update to import vhal_const_2_0 as vhal_const_2_1 is gone
Bug: 66915780
Test: Manual test by running scripts locally with a connected device
Change-Id: I46b4e24d37fce6efbb1be5dbb5edd1f051bd874d
diff --git a/tools/emulator/diagnostic_injector.py b/tools/emulator/diagnostic_injector.py
index 7678576..1082e5b 100755
--- a/tools/emulator/diagnostic_injector.py
+++ b/tools/emulator/diagnostic_injector.py
@@ -25,7 +25,7 @@
import sys
import time
-import vhal_consts_2_1 as c
+import vhal_consts_2_0 as c
# vhal_emulator depends on a custom Python package that requires installation
# give user guidance should the import fail
diff --git a/tools/emulator/gui.py b/tools/emulator/gui.py
index 594526a..3a0161d 100755
--- a/tools/emulator/gui.py
+++ b/tools/emulator/gui.py
@@ -24,7 +24,7 @@
import VehicleHalProto_pb2
from vhal_emulator import Vhal
-import vhal_consts_2_1 as c
+import vhal_consts_2_0 as c
# Define a simple thread that receives messages from a vhal object (v) and prints them
diff --git a/tools/emulator/vhal_emulator_test.py b/tools/emulator/vhal_emulator_test.py
index ea4030d..3cf2e8b 100755
--- a/tools/emulator/vhal_emulator_test.py
+++ b/tools/emulator/vhal_emulator_test.py
@@ -37,7 +37,7 @@
sys.dont_write_bytecode = True
import VehicleHalProto_pb2
-import vhal_consts_2_1
+import vhal_consts_2_0
import vhal_emulator
import logging
@@ -49,12 +49,12 @@
_vhal = 0 # Handle to VHAL object that communicates over socket to DUT
# TODO: b/38203109 - Fix OBD2 values, implement handling for complex properties
_skipProps = [
- vhal_consts_2_1.VEHICLEPROPERTY_OBD2_LIVE_FRAME,
- vhal_consts_2_1.VEHICLEPROPERTY_OBD2_FREEZE_FRAME,
- vhal_consts_2_1.VEHICLEPROPERTY_OBD2_FREEZE_FRAME_INFO,
- vhal_consts_2_1.VEHICLEPROPERTY_OBD2_FREEZE_FRAME_CLEAR,
- vhal_consts_2_1.VEHICLEPROPERTY_VEHICLE_MAP_SERVICE,
- vhal_consts_2_1.VEHICLEPROPERTY_WHEEL_TICK, # Need to support complex properties
+ vhal_consts_2_0.VEHICLEPROPERTY_OBD2_LIVE_FRAME,
+ vhal_consts_2_0.VEHICLEPROPERTY_OBD2_FREEZE_FRAME,
+ vhal_consts_2_0.VEHICLEPROPERTY_OBD2_FREEZE_FRAME_INFO,
+ vhal_consts_2_0.VEHICLEPROPERTY_OBD2_FREEZE_FRAME_CLEAR,
+ vhal_consts_2_0.VEHICLEPROPERTY_VEHICLE_MAP_SERVICE,
+ vhal_consts_2_0.VEHICLEPROPERTY_WHEEL_TICK, # Need to support complex properties
0x21E00666 # FakeDataControllingProperty - an internal test property
]
@@ -70,7 +70,7 @@
elif valType in self._types.TYPE_BYTES:
# Generate array of integers counting from 0
testValue = list(range(len(origValue)))
- elif valType == vhal_consts_2_1.VEHICLEPROPERTYTYPE_BOOLEAN:
+ elif valType == vhal_consts_2_0.VEHICLEPROPERTYTYPE_BOOLEAN:
testValue = origValue ^ 1
elif valType in self._types.TYPE_INT32:
try:
@@ -113,7 +113,7 @@
value = rxMsg.value[0].string_value
elif valType in self._types.TYPE_BYTES:
value = rxMsg.value[0].bytes_value
- elif valType == vhal_consts_2_1.VEHICLEPROPERTYTYPE_BOOLEAN:
+ elif valType == vhal_consts_2_0.VEHICLEPROPERTYTYPE_BOOLEAN:
value = rxMsg.value[0].int32_values[0]
elif valType in self._types.TYPE_INT32:
value = rxMsg.value[0].int32_values[0]
@@ -305,5 +305,5 @@
self._configs = self._vhal.rxMsg().config
if __name__ == '__main__':
- v = VhalTest(vhal_consts_2_1.vhal_types_2_0)
+ v = VhalTest(vhal_consts_2_0.vhal_types_2_0)
v.runTests()