* Initial commit of a working Haute Lite / Ultra with translated comments. Enabling/disabling the ambient light and counts will need to be moved to the web config. * Moved AnimationStation over to our actual code base instead of a library. This allows us to use protobuf, modify the file formats a bit more, and make the code a lot more dynamic. Also removed .hpp as we do not use that naming convention in our code. * Renaming some lowercases * Lowercase the folder as well * Linux is sensitive to case while Windows doesn't care :( * More casing * More capitalizations * Moved everything out of the animationstation and playerled libraries, removed as many statics as I could find. Still a few statics in Animation:: but still cleaning. DO NOT USE: This doesn't work yet, but it is getting closer * Removed the static case rgbs in favor of ambient / linkage now that we're fully integrated into the source. This is very close to where we want to be * Added COSMOX M Ultra and M Lite configs Moved all of our ambient lighting over to boardconfig defines Updated the OpenCore0 definitions to use our new ambient lighting * Almost done, changed bytes over to our RGB define for colors, touched up a lot of different things. Chase effect is now properly working with wrap-around, cycling is all much better. Removed power-on animations as we have no real reason for them right now, we can add them back in later. * Changed hotkeys for case lights a bit * Slight code clean-ups, I'm happy with this * Last bit of clean-up before moving to review * Revert back to nothing * More code cleanups. There's a known bug with linkage that will be solved in the next branch * Deprecated some proto config settings
43 lines
781 B
C++
43 lines
781 B
C++
#ifndef _HELPER_H_
|
|
#define _HELPER_H_
|
|
|
|
#include "pico/time.h"
|
|
#include <string>
|
|
|
|
#include "BoardConfig.h"
|
|
#include <stdint.h>
|
|
#include "animationstation.h"
|
|
#include "playerleds.h"
|
|
|
|
// GP2040-CE Board Config (64 character limit)
|
|
#ifndef GP2040_BOARDCONFIG
|
|
#define GP2040_BOARDCONFIG "Unknown"
|
|
#endif
|
|
|
|
#define PLED_REPORT_SIZE 32
|
|
|
|
#ifndef PLED1_PIN
|
|
#define PLED1_PIN -1
|
|
#endif
|
|
#ifndef PLED2_PIN
|
|
#define PLED2_PIN -1
|
|
#endif
|
|
#ifndef PLED3_PIN
|
|
#define PLED3_PIN -1
|
|
#endif
|
|
#ifndef PLED4_PIN
|
|
#define PLED4_PIN -1
|
|
#endif
|
|
#ifndef PLED_TYPE
|
|
#define PLED_TYPE PLED_TYPE_NONE
|
|
#endif
|
|
#ifndef PLED_COLOR
|
|
#define PLED_COLOR ColorWhite // White
|
|
#endif
|
|
|
|
static inline bool isValidPin(int32_t pin) {
|
|
int32_t numBank0GPIOS = NUM_BANK0_GPIOS;
|
|
return pin >= 0 && pin < numBank0GPIOS; }
|
|
|
|
#endif
|