Skip to content

Commit 93ebc33

Browse files
committed
fix integration test errors
1 parent 6a2aad4 commit 93ebc33

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/edgepi/adc/edgepi_adc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,13 @@ def start_conversions(self):
341341
filter_mode = state.filter_mode.code
342342

343343
conv_delay = expected_initial_time_delay(
344-
adc_num, data_rate.value.op_code, filter_mode.value.opcode
344+
adc_num, data_rate.value.op_code, filter_mode.value.op_code
345345
)
346346
_logger.debug(
347347
(
348348
f"\nComputed time delay = {conv_delay} (ms) with the following config opcodes:\n"
349-
f"adc_num={adc_num}, conv_mode={hex(conv_mode)}, "
350-
f"data_rate={hex(data_rate)} filter_mode={hex(filter_mode)}\n"
349+
f"adc_num={adc_num}, conv_mode={hex(conv_mode.value.op_code)}, "
350+
f"data_rate={hex(data_rate.value.op_code)} filter_mode={hex(filter_mode.value.op_code)}\n"
351351
)
352352
)
353353
self.__send_start_command(adc_num)
@@ -419,7 +419,7 @@ def read_voltage(self):
419419
_logger.debug(
420420
(
421421
f"\nContinuous time delay = {delay} (ms) with the following config opcodes:\n"
422-
f"adc_num={adc}, data_rate={hex(data_rate)}\n"
422+
f"adc_num={adc}, data_rate={hex(data_rate.value.op_code)}\n"
423423
)
424424
)
425425
time.sleep(delay / 1000)

src/test_edgepi/integration_tests/test_adc/test_adc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,4 +804,4 @@ def test_select_differential(adc_num, diff, mux_reg, mux_reg_val, adc):
804804
def test_rtd_mode(enable, adc):
805805
# TODO: pass if no error raised for now, check RTD is on once get_state is implemented
806806
adc.rtd_mode(enable=enable)
807-
assert adc.get_state().rtd_on.value
807+
assert adc.get_state().rtd_on.value == enable

0 commit comments

Comments
 (0)