serialhdl: Rename register_callback() to register_response()

Rename the method and use that name in the mcu class as well.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-06-20 17:36:46 -04:00
parent daadb36cb4
commit 647f1ee2e0
6 changed files with 24 additions and 23 deletions

View File

@@ -28,7 +28,8 @@ class SensorBase:
self.mcu = mcu = self.spi.get_mcu()
# Reader chip configuration
self.oid = oid = mcu.create_oid()
mcu.register_msg(self._handle_spi_response, "thermocouple_result", oid)
mcu.register_response(self._handle_spi_response,
"thermocouple_result", oid)
mcu.register_config_callback(self._build_config)
def setup_minmax(self, min_temp, max_temp):
adc_range = [self.calc_adc(min_temp), self.calc_adc(max_temp)]