mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 20:46:52 +03:00
@@ -36,7 +36,7 @@ extern "C" {
|
|||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "ClassLogFile.h"
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
#include "server_tflite.h""
|
#include "server_tflite.h"
|
||||||
|
|
||||||
#include "server_help.h"
|
#include "server_help.h"
|
||||||
#include "interface_mqtt.h"
|
#include "interface_mqtt.h"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <ClassFlowCNNGeneral.h>
|
#include <ClassFlowCNNGeneral.h>
|
||||||
#include <ClassFlowCNNGeneral.h>
|
#include <ClassFlowCNNGeneral.h>
|
||||||
#include <ClassFlowMakeImage.h>
|
#include <ClassFlowMakeImage.h>
|
||||||
|
#include <Helper.h>
|
||||||
|
|
||||||
|
|
||||||
class UnderTestPost : public ClassFlowPostProcessing {
|
class UnderTestPost : public ClassFlowPostProcessing {
|
||||||
@@ -15,7 +15,6 @@ class UnderTestPost : public ClassFlowPostProcessing {
|
|||||||
: ClassFlowPostProcessing::ClassFlowPostProcessing(lfc, _analog, _digit) {}
|
: ClassFlowPostProcessing::ClassFlowPostProcessing(lfc, _analog, _digit) {}
|
||||||
|
|
||||||
using ClassFlowPostProcessing::InitNUMBERS;
|
using ClassFlowPostProcessing::InitNUMBERS;
|
||||||
using ClassFlowPostProcessing::RundeOutput;
|
|
||||||
using ClassFlowPostProcessing::flowAnalog;
|
using ClassFlowPostProcessing::flowAnalog;
|
||||||
using ClassFlowPostProcessing::flowDigit;
|
using ClassFlowPostProcessing::flowDigit;
|
||||||
|
|
||||||
@@ -107,4 +106,12 @@ void setDecimalShift(UnderTestPost* _UnderTestPost, int decimal_shift);
|
|||||||
*/
|
*/
|
||||||
void setAnalogdigitTransistionStart(UnderTestPost* _underTestPost, float _analogdigitTransistionStart);
|
void setAnalogdigitTransistionStart(UnderTestPost* _underTestPost, float _analogdigitTransistionStart);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the allowNegatives in testobject
|
||||||
|
*
|
||||||
|
* @param _underTestPost the testobject
|
||||||
|
* @param _allowNegatives if should be set true or false
|
||||||
|
*/
|
||||||
|
void setAllowNegatives(UnderTestPost* _underTestPost, bool _allowNegatives);
|
||||||
|
|
||||||
#endif // TEST_FLOW_H
|
#endif // TEST_FLOW_H
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Testfall für Überprüfung allowNegatives
|
* @brief Testfall für Überprüfung allowNegatives
|
||||||
*
|
*
|
||||||
@@ -33,7 +34,7 @@ void testNegative() {
|
|||||||
setPreValue(underTestPost, preValue_extended);
|
setPreValue(underTestPost, preValue_extended);
|
||||||
result = process_doFlow(underTestPost);
|
result = process_doFlow(underTestPost);
|
||||||
TEST_ASSERT_EQUAL_STRING("no error", underTestPost->getReadoutError().c_str());
|
TEST_ASSERT_EQUAL_STRING("no error", underTestPost->getReadoutError().c_str());
|
||||||
TEST_ASSERT_EQUAL_STRING(underTestPost->RundeOutput(preValue_extended, analogs.size()+1).c_str(), result.c_str());
|
TEST_ASSERT_EQUAL_STRING(RundeOutput(preValue_extended, analogs.size()+1).c_str(), result.c_str());
|
||||||
delete underTestPost;
|
delete underTestPost;
|
||||||
|
|
||||||
// extendResolution=true
|
// extendResolution=true
|
||||||
|
|||||||
@@ -14,22 +14,6 @@ static const char *TAGMAIN = "main";
|
|||||||
#define __SD_USE_ONE_LINE_MODE__
|
#define __SD_USE_ONE_LINE_MODE__
|
||||||
#include "server_GPIO.h"
|
#include "server_GPIO.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Init_NVS_SDCard()
|
bool Init_NVS_SDCard()
|
||||||
{
|
{
|
||||||
esp_err_t ret = nvs_flash_init();
|
esp_err_t ret = nvs_flash_init();
|
||||||
@@ -68,7 +52,7 @@ bool Init_NVS_SDCard()
|
|||||||
// formatted in case when mounting fails.
|
// formatted in case when mounting fails.
|
||||||
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
|
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
|
||||||
.format_if_mount_failed = false,
|
.format_if_mount_failed = false,
|
||||||
.max_files = 5,
|
.max_files = 7, // anstatt 5 (2022-09-21)
|
||||||
.allocation_unit_size = 16 * 1024
|
.allocation_unit_size = 16 * 1024
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -89,12 +73,29 @@ bool Init_NVS_SDCard()
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sdmmc_card_print_info(stdout, card);
|
|
||||||
|
|
||||||
|
sdmmc_card_print_info(stdout, card);
|
||||||
|
SaveSDCardInfo(card);
|
||||||
return true;
|
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
|
* @brief startup the test. Like a test-suite
|
||||||
* all test methods must be called here
|
* all test methods must be called here
|
||||||
|
|||||||
Reference in New Issue
Block a user