Skip to content

Commit

Permalink
Uploaded binaries for S2 mini
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrGri committed Sep 17, 2023
1 parent 233f358 commit b4c5276
Show file tree
Hide file tree
Showing 12 changed files with 55,935 additions and 9,738 deletions.
8 changes: 4 additions & 4 deletions Arduino/Esp32/Main/Main.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
//#define PUT_TARGET_CYCLE_TIME_IN_US DAP_MICROSECONDS_PER_SECOND / 7500

// 3.75kHz
#define ADC_SAMPLE_RATE ADS1256_DRATE_3750SPS
#define PUT_TARGET_CYCLE_TIME_IN_US DAP_MICROSECONDS_PER_SECOND / 3750
//#define ADC_SAMPLE_RATE ADS1256_DRATE_3750SPS
//#define PUT_TARGET_CYCLE_TIME_IN_US DAP_MICROSECONDS_PER_SECOND / 3750

// 2.0kHz
//#define ADC_SAMPLE_RATE ADS1256_DRATE_2000SPS
//#define PUT_TARGET_CYCLE_TIME_IN_US DAP_MICROSECONDS_PER_SECOND / 2000

// 1.0kHz
//#define ADC_SAMPLE_RATE ADS1256_DRATE_1000SPS
//#define PUT_TARGET_CYCLE_TIME_IN_US DAP_MICROSECONDS_PER_SECOND / 1000
#define ADC_SAMPLE_RATE ADS1256_DRATE_1000SPS
#define PUT_TARGET_CYCLE_TIME_IN_US DAP_MICROSECONDS_PER_SECOND / 1000

10 changes: 6 additions & 4 deletions Arduino/Esp32/Main/Main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void pedalUpdateTask( void * pvParameters )

bool configWasUpdated_b = false;
// Take the semaphore and just update the config file, then release the semaphore
if(xSemaphoreTake(semaphore_updateConfig, 1)==pdTRUE)
if(xSemaphoreTake(semaphore_updateConfig, (TickType_t)1)==pdTRUE)
{
Serial.println("Update pedal config!");
configUpdateAvailable = false;
Expand All @@ -424,6 +424,7 @@ void pedalUpdateTask( void * pvParameters )
}
else
{
semaphore_updateConfig = xSemaphoreCreateMutex();
Serial.println("semaphore_updateConfig == 0");
}
}
Expand Down Expand Up @@ -553,13 +554,14 @@ void pedalUpdateTask( void * pvParameters )
// compute controller output
if(semaphore_updateJoystick!=NULL)
{
if(xSemaphoreTake(semaphore_updateJoystick, 1)==pdTRUE) {
if(xSemaphoreTake(semaphore_updateJoystick, (TickType_t)1)==pdTRUE) {
joystickNormalizedToInt32 = NormalizeControllerOutputValue(filteredReading, dap_calculationVariables_st.Force_Min, dap_calculationVariables_st.Force_Max, dap_config_st.payLoadPedalConfig_.maxGameOutput);
xSemaphoreGive(semaphore_updateJoystick);
}
}
else
{
semaphore_updateJoystick = xSemaphoreCreateMutex();
Serial.println("semaphore_updateJoystick == 0");
}

Expand Down Expand Up @@ -630,7 +632,7 @@ void serialCommunicationTask( void * pvParameters )

if(semaphore_updateConfig!=NULL)
{
if(xSemaphoreTake(semaphore_updateConfig, 1)==pdTRUE)
if(xSemaphoreTake(semaphore_updateConfig, (TickType_t)1)==pdTRUE)
{
DAP_config_st * dap_config_st_local_ptr;
dap_config_st_local_ptr = &dap_config_st_local;
Expand Down Expand Up @@ -711,7 +713,7 @@ void serialCommunicationTask( void * pvParameters )
if (IsControllerReady()) {
if(semaphore_updateJoystick!=NULL)
{
if(xSemaphoreTake(semaphore_updateJoystick, 1)==pdTRUE)
if(xSemaphoreTake(semaphore_updateJoystick, (TickType_t)1)==pdTRUE)
{
joystickNormalizedToInt32_local = joystickNormalizedToInt32;
xSemaphoreGive(semaphore_updateJoystick);
Expand Down
3 changes: 3 additions & 0 deletions Arduino/Esp32/arduinoCliBuildScript_s2_mini.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
arduino-cli compile --fqbn esp32:esp32:lolin_s2_mini --output-dir bin_s2_mini Main/. --libraries ..\libs\


Binary file modified Arduino/Esp32/bin/Main.ino.bin
Binary file not shown.
Binary file modified Arduino/Esp32/bin/Main.ino.elf
Binary file not shown.
19,458 changes: 9,729 additions & 9,729 deletions Arduino/Esp32/bin/Main.ino.map

Large diffs are not rendered by default.

Binary file added Arduino/Esp32/bin_s2_mini/Main.ino.bin
Binary file not shown.
Binary file added Arduino/Esp32/bin_s2_mini/Main.ino.bootloader.bin
Binary file not shown.
Binary file added Arduino/Esp32/bin_s2_mini/Main.ino.elf
Binary file not shown.
46,192 changes: 46,192 additions & 0 deletions Arduino/Esp32/bin_s2_mini/Main.ino.map

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ There are two recommended ways to install the code on the ESP32. (a) built the s
3. Flash the [code](Arduino/Esp32/Main), e.g. via Ardiono IDE to esp32.

#### Flash prebuilt binaries via webflasher
The prebuilt binaries for the regular ESP32 can be found [here](Arduino/Esp32/bin). They can be flashed via the ESP [webflasher](https://esp.huhn.me/).
The prebuilt binaries for the [regular ESP32](Arduino/Esp32/bin) the and [ESP32 S2 mini](Arduino/Esp32/bin_s2_mini) are available. They can be flashed via the ESP [webflasher](https://esp.huhn.me/).

Memory adress | File
:-------------------------:|:-------------------------:
Expand Down

0 comments on commit b4c5276

Please sign in to comment.