fixes for gfx

This commit is contained in:
SpaceyKasey 2023-01-21 00:45:01 -05:00
parent 1af412dd4b
commit 00c301f799
6 changed files with 34 additions and 11 deletions

5
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"files.associations": {
"ios": "cpp"
}
}

View file

@ -1 +1,2 @@
# Lanes # Trigor Mortse
Trigor Mortse is an eurorack sequencer module based on morse code.

View file

@ -22,9 +22,9 @@ const int DisplaySpi = 0; //todo: find spi port ## from library
Encoder LeftEnc( Enc1P1, Enc1P2); Encoder LeftEnc( Enc1P1, Enc1P2);
Encoder RightEnc( Enc2P1, Enc2P2); Encoder RightEnc( Enc2P1, Enc2P2);
MortseUi Ui(DisplaySpi); //MortseUi Ui(DisplaySpi);
String TestText = "Momento Mortse" String TestText = "Momento Mortse";
int E1 = 0; int E1 = 0;
int E2 = 0; int E2 = 0;
@ -176,7 +176,7 @@ void loop() {
//Insert Beat Output here! //Insert Beat Output here!
char outputChar = TestString[Channel1Index]; char outputChar = TestString[Channel1Index];
if (outputChar == '/0'){ if (outputChar == '\0'){
Channel1Index = 0; Channel1Index = 0;
outputChar = TestString[Channel1Index]; outputChar = TestString[Channel1Index];
} }
@ -212,7 +212,7 @@ void loop() {
Channel3State = false; Channel3State = false;
} }
Ui.tick(); //Ui.tick();
} }

View file

@ -6,6 +6,22 @@ byte MortseGfx::cursor_y = 0;
enum cursorState MortseGfx::cursor_state = hidden; enum cursorState MortseGfx::cursor_state = hidden;
void MortseGfx::init(){ void MortseGfx::MortseGfx(){
}
void MortseGfx::MoveCursor(byte row, byte column){
}
void MortseGfx::SetChar(byte row, byte column, char value){
}
void MortseGfx::ClearChar(byte row, byte column){
}
void MortseGfx::SetCursorState(cursorState state){
} }

View file

@ -24,7 +24,7 @@
#define LOGO_HEIGHT 16 #define LOGO_HEIGHT 16
#define LOGO_WIDTH 16 #define LOGO_WIDTH 16
static const unsigned char PROGMEM //static const unsigned char PROGMEM
class MortseGfx class MortseGfx
{ {
@ -35,8 +35,8 @@ class MortseGfx
public: public:
void init();
void tick(); void MortseGfx();
void MoveCursor(byte row, byte column); void MoveCursor(byte row, byte column);

View file

@ -5,7 +5,7 @@
//Private Variables //Private Variables
unsigned long MortseUI::nextCursorFlash = 0; unsigned long MortseUI::nextCursorFlash = 0;
MortseGfx MortseUI::Gfx(); MortseGfx MortseUI::_gfx();
enum cursorState MortseUI::_cursorStyle = below; enum cursorState MortseUI::_cursorStyle = below;
bool MortseUI::_cursor_visible = true; bool MortseUI::_cursor_visible = true;
@ -34,6 +34,7 @@ void MortseUi::MortseUi(){
for(int ix = 0; ix < LINE_LENGTH; ix++){ for(int ix = 0; ix < LINE_LENGTH; ix++){
_line1[ix] = _line2[ix] = _line1_buff[ix] = _line2_buff[ix] = ' '; _line1[ix] = _line2[ix] = _line1_buff[ix] = _line2_buff[ix] = ' ';
} }
} }
/// @brief Called every frame /// @brief Called every frame