Refactor and update configuration for single channel mode
- Created `test_relay_chn_tilt_multi.c` and `test_relay_chn_tilt_single.c` to implement comprehensive tests for the tilt functionality of relay channels, covering various scenarios including transitions between states and sensitivity settings. - Introduced a new partition table in `partitionTable.csv` for proper memory management. - Updated `sdkconfig` to set the relay channel count to 1 for single channel testing and adjusted related configurations. - Added default configuration file `sdkconfig.defaults.single` for streamlined testing setup.
This commit is contained in:
@@ -2,16 +2,38 @@
|
||||
|
||||
const char *TEST_TAG = "RELAY_CHN_TEST";
|
||||
|
||||
// GPIO eşlemesi (örn: GPIO_NUM_4 vs GPIO_NUM_5)
|
||||
const gpio_num_t gpio_map[] = {
|
||||
GPIO_NUM_4, GPIO_NUM_5, GPIO_NUM_18, GPIO_NUM_19
|
||||
};
|
||||
|
||||
const uint8_t gpio_count = sizeof(gpio_map) / sizeof(gpio_map[0]);
|
||||
const uint8_t relay_chn_count = gpio_count / 2;
|
||||
|
||||
// Konfigürasyon tabanlı inertia süresi
|
||||
const uint8_t relay_chn_count = CONFIG_RELAY_CHN_COUNT;
|
||||
const uint32_t opposite_inertia_ms = CONFIG_RELAY_CHN_OPPOSITE_INERTIA_MS;
|
||||
const uint32_t test_delay_margin_ms = 50; // ms toleransı
|
||||
|
||||
bool g_is_component_initialized = false;
|
||||
|
||||
// Test-wide GPIO map
|
||||
#if CONFIG_RELAY_CHN_COUNT > 1
|
||||
const uint8_t gpio_map[] = {
|
||||
0, 1,
|
||||
2, 3
|
||||
#if CONFIG_RELAY_CHN_COUNT > 2
|
||||
, 4, 5
|
||||
#if CONFIG_RELAY_CHN_COUNT > 3
|
||||
, 6, 7
|
||||
#if CONFIG_RELAY_CHN_COUNT > 4
|
||||
, 8, 9
|
||||
#if CONFIG_RELAY_CHN_COUNT > 5
|
||||
, 10, 11
|
||||
#if CONFIG_RELAY_CHN_COUNT > 6
|
||||
, 12, 13
|
||||
#if CONFIG_RELAY_CHN_COUNT > 7
|
||||
, 14, 15
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
#else
|
||||
const uint8_t gpio_map[] = {4, 5};
|
||||
#endif
|
||||
|
||||
const uint8_t gpio_count = sizeof(gpio_map) / sizeof(gpio_map[0]);
|
||||
Reference in New Issue
Block a user