Minor code cleanup

This commit is contained in:
alastaira
2023-09-18 21:48:09 +01:00
parent 80856bf473
commit 41318bff92
3 changed files with 9 additions and 11 deletions

View File

@@ -1,6 +1,5 @@
/*************************************************** /***************************************************
Copyright (c) 2020 Luis Llamas Copyright (c) 2023 Alastair Aitchison, Playful Technology, 2020 Luis Llamas (www.luisllamas.es)
(www.luisllamas.es)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version. the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
@@ -10,6 +9,11 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses
****************************************************/ ****************************************************/
/**
* EyePresets.h
* Defines the eye config associated with each emotion
*/
#ifndef _EYEPRESETS_h #ifndef _EYEPRESETS_h
#define _EYEPRESETS_h #define _EYEPRESETS_h

View File

@@ -22,8 +22,7 @@ You should have received a copy of the GNU Affero General Public License along w
#include "Animations.h" #include "Animations.h"
#include "EyeConfig.h" #include "EyeConfig.h"
class EyeVariation class EyeVariation {
{
public: public:
EyeVariation(); EyeVariation();
@@ -41,6 +40,4 @@ public:
void Apply(float t); void Apply(float t);
}; };
#endif #endif

View File

@@ -23,10 +23,7 @@ Face::Face(uint16_t screenWidth, uint16_t screenHeight, uint16_t eyeSize)
// u8g2 uses 8-bit I2C address, so we shift the 7-bit address left by one // u8g2 uses 8-bit I2C address, so we shift the 7-bit address left by one
u8g2.setI2CAddress(0x3C<<1); u8g2.setI2CAddress(0x3C<<1);
u8g2.begin(); u8g2.begin();
u8g2.clearBuffer(); // clear the internal memory u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
u8g2.drawStr(0,10,"Hello World!"); // write something to the internal memory
u8g2.sendBuffer(); // transfer internal memory to the display
Width = screenWidth; Width = screenWidth;
Height = screenHeight; Height = screenHeight;