rainbowio: Fix some things the unix build errors about

This commit is contained in:
Jeff Epler 2021-11-12 17:06:12 -06:00
parent dfef5014ed
commit c91901dc37
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,8 @@
#ifndef CP_SHARED_BINDINGS_RAINBOWIO_INIT_H
#define CP_SHARED_BINDINGS_RAINBOWIO_INIT_H
#include <stdint.h>
#include "py/misc.h"
const int32_t colorwheel(float pos);
int32_t colorwheel(mp_float_t pos);
#endif // CP_SHARED_BINDINGS_RAINBOWIO_INIT_H

View File

@ -26,7 +26,7 @@
#include "shared-bindings/rainbowio/__init__.h"
const int32_t colorwheel(float pos) {
int32_t colorwheel(mp_float_t pos) {
if (pos > 255) {
pos = pos - ((uint32_t)(pos / 256) * 256);
}