reef-pi / drivers

Various sensors, controller and IC drivers for reef-pi
Other
5 stars 17 forks source link

Fix bug parsing address for ph_board and pico_board #44

Closed Ranthalion closed 4 years ago

Ranthalion commented 4 years ago

Fix the following panic for ph_board and pico_board.

panic: interface conversion: interface {} is float64, not int [recovered]
        panic: interface conversion: interface {} is float64, not int

Validation succeeded for the driver and params, but creating the driver did not correctly convert to int using hal.ConvertToInt. Fixed error in NewDriver methods and added tests to confirm.