This commit is contained in:
DefenderOfHyrule 2024-07-08 11:41:11 +02:00
parent 4f9a281876
commit 2d0609cb29
2 changed files with 8 additions and 2 deletions

View file

@ -76,7 +76,7 @@ jobs:
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
echo "release_tag=$RELEASE_TAG" echo "release_tag=$RELEASE_TAG"
- name: Createa a release - name: Create a release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
tag_name: ${{ steps.tag.outputs.release_tag }} tag_name: ${{ steps.tag.outputs.release_tag }}

8
misc.c
View file

@ -94,7 +94,7 @@ void halt_with_error(uint32_t err, uint32_t bits)
zzz(); zzz();
} }
void put_pixel(uint32_t pixel_grb) void put_pixel(uint32_t pixel_rgb)
{ {
static bool led_enabled = false; static bool led_enabled = false;
if (is_pico()) if (is_pico())
@ -106,6 +106,12 @@ void put_pixel(uint32_t pixel_grb)
} }
return; return;
} }
uint8_t red = (pixel_rgb >> 16) & 0xFF;
uint8_t green = (pixel_rgb >> 8) & 0xFF;
uint8_t blue = pixel_rgb & 0xFF;
uint32_t pixel_grb = (green << 16) | (red << 8) | blue;
ws2812_program_init(pio0, 3, ws_pio_offset, led_pin(), 800000, true); ws2812_program_init(pio0, 3, ws_pio_offset, led_pin(), 800000, true);
if (!led_enabled && pwr_pin() != 31) if (!led_enabled && pwr_pin() != 31)
{ {