resolve release merge conflicts

This commit is contained in:
CaCO3
2022-11-25 16:48:37 +01:00
committed by GitHub
parent 55a06dbe1d
commit e90beffb44

View File

@@ -1,13 +1,19 @@
#include <unity.h>
#include "components/jomjol-flowcontroll/test_cnnflowcontroll.cpp"
#include "components/jomjol-flowcontroll/test_flow_postrocess_helper.cpp"
#include "components/jomjol-flowcontroll/test_flowpostprocessing.cpp"
#include "components/jomjol-flowcontroll/test_flow_pp_negative.cpp"
#include "components/jomjol-flowcontroll/test_ZeigerEvalAnalogToDigitNeu.cpp"
#include "components/jomjol-flowcontroll/test_getReadoutRawString.cpp"
// SD-Card ////////////////////
#include "nvs_flash.h"
#include "esp_vfs_fat.h"
#include "sdmmc_cmd.h"
#include "driver/sdmmc_host.h"
#include "driver/sdmmc_defs.h"
static const char *TAGMAIN = "main";
static const char *TAG = "MAIN TEST";
#define __SD_USE_ONE_LINE_MODE__
#include "server_GPIO.h"
bool Init_NVS_SDCard()
{
@@ -18,7 +24,7 @@ bool Init_NVS_SDCard()
}
////////////////////////////////////////////////
ESP_LOGI(TAGMAIN, "Using SDMMC peripheral");
ESP_LOGI(TAG, "Using SDMMC peripheral");
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
// This initializes the slot without card detect (CD) and write protect (WP) signals.
@@ -47,7 +53,7 @@ bool Init_NVS_SDCard()
// formatted in case when mounting fails.
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
.format_if_mount_failed = false,
.max_files = 5,
.max_files = 7, // anstatt 5 (2022-09-21)
.allocation_unit_size = 16 * 1024
};
@@ -60,32 +66,60 @@ bool Init_NVS_SDCard()
if (ret != ESP_OK) {
if (ret == ESP_FAIL) {
ESP_LOGE(TAGMAIN, "Failed to mount filesystem. "
ESP_LOGE(TAG, "Failed to mount filesystem. "
"If you want the card to be formatted, set format_if_mount_failed = true.");
} else {
ESP_LOGE(TAGMAIN, "Failed to initialize the card (%s). "
ESP_LOGE(TAG, "Failed to initialize the card (%s). "
"Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret));
}
return false;
}
sdmmc_card_print_info(stdout, card);
sdmmc_card_print_info(stdout, card);
SaveSDCardInfo(card);
return true;
}
void initGPIO()
{
gpio_config_t io_conf;
//set as output mode
io_conf.mode = gpio_mode_t::GPIO_MODE_INPUT;
//bit mask of the pins that you want to set,e.g.GPIO18/19
io_conf.pull_down_en = gpio_pulldown_t::GPIO_PULLDOWN_ENABLE;
//set pull-up mode
io_conf.pull_up_en = gpio_pullup_t::GPIO_PULLUP_DISABLE;
//configure GPIO with the given settings
gpio_config(&io_conf);
}
/**
* @brief startup the test. Like a test-suite
* all test methods must be called here
*/
extern "C" void app_main()
{
initGPIO();
Init_NVS_SDCard();
UNITY_BEGIN();
esp_log_level_set("*", ESP_LOG_DEBUG); // set all components to ERROR level
// RUN_TEST(test_ZeigerEval);
// RUN_TEST(test_ZeigerEvalHybrid);
RUN_TEST(test_doFlow);
UNITY_BEGIN();
RUN_TEST(testNegative);
RUN_TEST(test_analogToDigit_Standard);
RUN_TEST(test_analogToDigit_Transition);
RUN_TEST(test_doFlowPP);
RUN_TEST(test_doFlowPP1);
RUN_TEST(test_doFlowPP2);
RUN_TEST(test_doFlowPP3);
// getReadoutRawString test
RUN_TEST(test_getReadoutRawString);
UNITY_END();
}
}