summaryrefslogtreecommitdiff
path: root/src/modules/spokes
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/spokes')
-rw-r--r--src/modules/spokes/spokes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/spokes/spokes.c b/src/modules/spokes/spokes.c
index 0aa8eed..2b5fbe3 100644
--- a/src/modules/spokes/spokes.c
+++ b/src/modules/spokes/spokes.c
@@ -25,9 +25,9 @@ typedef struct spokes_context_t {
typedef struct spokes_setup_t {
til_setup_t til_setup;
- int iterations;
+ unsigned iterations;
float twist;
- int thickness;
+ unsigned thickness;
} spokes_setup_t;
static void spokes_draw_line(til_fb_fragment_t *fragment, int x1, int y1, int x2, int y2, uint32_t color, int thickness)
@@ -331,13 +331,13 @@ int spokes_setup(const til_settings_t *settings, til_setting_t **res_setting, co
if (!setup)
return -ENOMEM;
- if (sscanf(iterations->value, "%i", &setup->iterations) != 1)
+ if (sscanf(iterations->value, "%u", &setup->iterations) != 1)
return til_setup_free_with_failed_setting_ret_err(&setup->til_setup, iterations, res_setting, -EINVAL);
if (sscanf(twist->value, "%f", &setup->twist) != 1)
return til_setup_free_with_failed_setting_ret_err(&setup->til_setup, twist, res_setting, -EINVAL);
- if (sscanf(thickness->value, "%i", &setup->thickness) != 1)
+ if (sscanf(thickness->value, "%u", &setup->thickness) != 1)
return til_setup_free_with_failed_setting_ret_err(&setup->til_setup, thickness, res_setting, -EINVAL);
*res_setup = &setup->til_setup;
© All Rights Reserved