cleanup main.cpp, split platform code into a Platform object

This commit is contained in:
2021-03-31 11:50:00 -07:00
parent a6534bcb20
commit 10bbcd6786
21 changed files with 768 additions and 408 deletions

View File

@@ -2,7 +2,8 @@
#include <Figments.h>
//#define PLATFORM_PHOTON
#define PLATFORM_ARDUINO
//#define PLATFORM_ARDUINO
#define RENDERBUG_VERSION 2
struct HardwareConfig {
uint8_t version = 2;
@@ -29,7 +30,11 @@ struct HardwareConfig {
LinearCoordinateMapping toCoordMap() const;
static constexpr uint16_t MAX_LED_NUM = 255;
#ifdef PLATFORM_PHOTON
static constexpr bool HAS_MPU_6050 = true;
#else
static constexpr bool HAS_MPU_6050 = false;
#endif
private:
uint8_t getCRC() const;