Revert pointer change. not worth the few bytes it saved.

This commit is contained in:
2025-05-31 20:28:17 -07:00
parent 18e53e90c1
commit edd7df1cd6
6 changed files with 103 additions and 113 deletions

View File

@ -16,7 +16,8 @@
class Gravity {
public:
// Constructor
Gravity() {}
Gravity()
: display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1) {}
// Deconstructor
~Gravity() {}
@ -27,14 +28,14 @@ class Gravity {
// Polling check for state change of inputs and outputs.
void Process();
Adafruit_SSD1306 * display = nullptr; // OLED display object.
Clock * clock = nullptr; // Clock source wrapper.
Adafruit_SSD1306 display; // OLED display object.
Clock clock; // Clock source wrapper.
DigitalOutput outputs[OUTPUT_COUNT]; // An array containing each Output object.
EncoderDir * encoder = nullptr; // Rotary encoder with button instance
Button * shift_button = nullptr;
Button * play_button = nullptr;
AnalogInput * cv1 = nullptr;
AnalogInput * cv2 = nullptr;
EncoderDir encoder; // Rotary encoder with button instance
Button shift_button;
Button play_button;
AnalogInput cv1;
AnalogInput cv2;
private:
void InitClock();