More SRAM optimisations. Needs testing

This commit is contained in:
Oleksiy
2024-07-31 18:17:39 +03:00
parent 8346c4d764
commit b244049db5
2 changed files with 65 additions and 79 deletions

View File

@ -6,7 +6,8 @@
#include <avr/wdt.h>
#include <NeoHWSerial.h>
const char version[5] = "1.1.1";
//const char version[5] = "1.1.1";
String version = "1.1.1";
#define SCREEN_ADDRESS 0x3C
@ -42,13 +43,13 @@ bool reverseEnc = false;
#define ANALOGUE_INPUT_2_PIN A1
const byte clockOutPin = 13;
const int outsPins[6] = {6, 11, 7, 10, 8, 9};
const byte outsPins[6] = {6, 11, 7, 10, 8, 9};
bool rotateScreen = true;
*/
int CV1Calibration = 512;
int CV2Calibration = 512;
uint16_t CV1Calibration = 512;
uint16_t CV2Calibration = 512;
bool showDone = false;
const int subDivs[20] = { -24, -12, -8, -6, -4, -3, -2, 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 64, 128 }; //positive - divide, negative - multiply, 0 - off
@ -64,7 +65,7 @@ struct channel {
byte CV1Range;
byte CV2Target;
byte CV2Range;
unsigned int offset;
uint8_t offset;
byte random;
byte seqPattern;
};
@ -662,7 +663,7 @@ void reboot() {
void calibrateCVs() {
CV1Calibration = analogRead(ANALOGUE_INPUT_1_PIN);
CV2Calibration = analogRead(ANALOGUE_INPUT_2_PIN);
//saveState();
saveState();
showDone = true;
updateScreen();
}