Commit 363d5ce4 authored by Fence's avatar Fence 🌈

ble ble

parent 1297d6bc
Pipeline #1255 passed with stage
in 32 seconds
......@@ -41,7 +41,7 @@ build/src/shelf-lights.o: ./src/shelf-lights.c $(OBJECTS) $(LIBS)
$(CXX_OBJECTS): ./build/%.o: ./lib/%.cc
mkdir -p $(@D)
$(CXX) -c $< -o $@ $(CFLAGS)
$(CXX) -c $< -o $@ $(CXXFLAGS)
$(C_OBJECTS): ./build/%.o: ./lib/%.c
mkdir -p $(@D)
......
#include "./single.hh"
void SingleColorProgram::run(OwOLedAddress *addr, int led_count) {
while(1) {
for(int i = 0; i<led_count; i++) {
owoled_send_pixel(addr, this->color);
}
}
}
#ifndef SINGLE_PROGRAM_HH
#define SINGLE_PROGRAM_HH
#include "../led_program.hh"
class SingleColorProgram: LedProgram {
public:
OwOLedPixel color;
void run(OwOLedAddress *addr, int led_count);
};
#endif
#include "./shelf.h"
#include "./programs/pride.hh"
#include "./programs/single.hh"
void run_program(OwOLedAddress *addr, int led_count) {
//TransPrideProgram prog = TransPrideProgram();
RainbowPrideProgram prog = RainbowPrideProgram();
//RainbowPrideProgram prog = RainbowPrideProgram();
SingleColorProgram prog = SingleColorProgram();
prog.color = OwOLedPixel{0xff, 0x69, 0xb4};
prog.run(addr, led_count);
}
......@@ -8,11 +8,6 @@
int main (void) {
OwOLedAddress addr = owoled_init(&PORTB, &DDRB, 1);
run_program(&addr, PIXELS);
//owoled_send_colors(&addr, 0x00, 0x10, 0x10);
//owoled_send_colors(&addr, 0x00, 0x10, 0x10);
//owoled_send_colors(&addr, 0x00, 0x10, 0x10);
owoled_show();
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment