Skip to content
Snippets Groups Projects
Commit b93e02ca authored by Václav Jelínek's avatar Václav Jelínek
Browse files

Add print statements to battery and led

parent 06a24fc7
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,8 @@ bool read_voltage_handler(repeating_timer_t *timer) {
}
static void battery_print(const mp_print_t *print, mp_obj_t self_in) {
//battery_obj_t *self = MP_OBJ_TO_PTR(self_in);
battery_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_printf(print, "Battery last value: %f V", self->last_value);
}
static mp_obj_t battery_read_voltage(mp_obj_t self_in) {
......
......@@ -29,7 +29,7 @@ static mp_obj_t led_make_new(const mp_obj_type_t* type, size_t n_args, size_t n_
}
static void led_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
mp_printf(print, "Led");
mp_printf(print, "Open-Cube user LED");
}
static mp_obj_t led_on(mp_obj_t self_in) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment