Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Open-Cube FW
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Cube
Open-Cube FW
Commits
b93e02ca
Commit
b93e02ca
authored
2 weeks ago
by
Václav Jelínek
Browse files
Options
Downloads
Patches
Plain Diff
Add print statements to battery and led
parent
06a24fc7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
micropython/modules/opencube_brick/battery.c
+2
-1
2 additions, 1 deletion
micropython/modules/opencube_brick/battery.c
micropython/modules/opencube_brick/led.c
+1
-1
1 addition, 1 deletion
micropython/modules/opencube_brick/led.c
with
3 additions
and
2 deletions
micropython/modules/opencube_brick/battery.c
+
2
−
1
View file @
b93e02ca
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
micropython/modules/opencube_brick/led.c
+
1
−
1
View file @
b93e02ca
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment