#pragma once #include #include #include #include constexpr int I2C_SLAVE_ADDR = 0x20; constexpr int I2C_POLL_COMMAND = 0x00; enum class AppView { MISSION_SELECT, AMI, DRIVER, TESTING }; std::ostream& operator<<(std::ostream& os, AppView view); class AppState { public: AppState(const std::string& i2c_dev_path); ~AppState(); void poll(); AppView get_view(); private: // This is optional so that we can still run the code on a PC without I2C std::optional i2c_dev_file; AppView view; };