adjusted protocol + timings

This commit is contained in:
2025-12-21 11:09:39 +01:00
parent f1788c1b91
commit 4e033b4ea6
16 changed files with 26018 additions and 26016 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
70cc0e86e4279026354563eb0a3b33e869f00fd4
b35ccb9d90fe91ce7d10bd2ce2da777099c8e675

View File

@@ -44,6 +44,7 @@
"**/*.a": true,
"**/*.lib": true,
"**/*.out": true,
"**/*.dwo": true
"**/*.dwo": true,
"**/*.bin": true
}
}

View File

@@ -123,7 +123,8 @@ void setup() {
mode = static_cast<enum NET_MODE>(EEPROM.read(MODE_ADDRESS));
rmt_config_t config = RMT_DEFAULT_CONFIG_TX(ALARM_PIN, RMT_CHANNEL_0);
config.clk_div = 80; // RMT clocks with 1MHz
// config.clk_div = 80; // RMT clocks with 1MHz
config.clk_div = 80; // RMT clocks with 4100kHz
config.tx_config.carrier_en = false;
config.tx_config.idle_level = RMT_IDLE_LEVEL_HIGH;
ESP_ERROR_CHECK(rmt_config(&config));

View File

@@ -313,7 +313,7 @@ void Cockpit::flashing(Color color, int state) {
}
void Cockpit::writeLEDs() {
this->writeCommTimer();
// this->writeCommTimer();
for (int i = 0; i < this->leds; i++) {
this->writeCommand();
@@ -327,7 +327,7 @@ void Cockpit::writeLEDs() {
}
void Cockpit::writeLED(uint8_t led) {
this->writeCommTimer();
// this->writeCommTimer();
for (int i = 0; i < this->leds; i++) {
this->writeCommand();
@@ -357,7 +357,7 @@ void Cockpit::writeZero() {
// costs 4 cp
byte pattern = 0b11100000; // should be 0b11000000 <-hardware hack
byte pattern = 0b11000000; // should be 0b11000000 <-hardware hack
byte invPattern = ~pattern;
for (uint8_t i = 0; i < 8; i++) {
@@ -464,7 +464,8 @@ void Cockpit::writeOne() {
// costs 4 cp
// byte pattern = 0b11001100; // this is how it should be
byte pattern = 0b11101110; // hardware hack, because open collector is slow -> more 1 than 0
byte pattern = 0b11011000; // hardware hack, because open collector is slow -> more 1 than 0
// byte pattern = 0b10101010; // hardware hack, because open collector is slow -> more 1 than 0
byte invPattern = ~pattern;
for (uint8_t i = 0; i < 8; i++) {