Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6e5baf1

Browse files
authoredOct 26, 2024··
fix(ci): cleanup code
1 parent be20fcb commit 6e5baf1

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed
 

‎tests/validation/periman/periman.ino

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void onReceive_cb(void) {
6262

6363
// This function is called by before each test is run
6464
void setup_test(String test_name, int8_t rx_pin = UART1_RX_DEFAULT, int8_t tx_pin = UART1_TX_DEFAULT) {
65-
log_i("Setting up %s test", test_name.c_str());
65+
log_d("Setting up %s test", test_name.c_str());
6666

6767
current_test = test_name;
6868
uart1_rx_pin = rx_pin;
@@ -74,12 +74,12 @@ void setup_test(String test_name, int8_t rx_pin = UART1_RX_DEFAULT, int8_t tx_pi
7474
Serial1.setPins(uart1_rx_pin, uart1_tx_pin);
7575
uart_internal_loopback(1, true);
7676
delay(100);
77-
log_i("Running %s test", test_name.c_str());
77+
log_d("Running %s test", test_name.c_str());
7878
}
7979

8080
// This function is called after each test is run
8181
void teardown_test(void) {
82-
log_i("Tearing down %s test", current_test.c_str());
82+
log_d("Tearing down %s test", current_test.c_str());
8383
if (test_executed) {
8484
pinMode(uart1_rx_pin, INPUT_PULLUP);
8585
pinMode(uart1_tx_pin, OUTPUT);
@@ -154,7 +154,7 @@ void ARDUINO_ISR_ATTR adcComplete() {
154154

155155
void adc_continuous_test(void) {
156156
#if !SOC_ADC_SUPPORTED || CONFIG_IDF_TARGET_ESP32P4
157-
setup_test("ADC_Continuous - NO ADC Support");
157+
setup_test("ADC_Continuous - NO Support ** P4 fails");
158158
#else
159159
setup_test("ADC_Continuous", ADC1_DEFAULT, ADC2_DEFAULT);
160160
test_executed = true;
@@ -168,10 +168,8 @@ void adc_continuous_test(void) {
168168
analogContinuous(adc_pins, adc_pins_count, 6, 20000, &adcComplete);
169169
analogContinuousStart();
170170

171-
Serial.println();
172171
while (adc_coversion_done == false) {
173-
Serial.print(".");
174-
delay(500);
172+
delay(1);
175173
}
176174

177175
if (!analogContinuousRead(&result, 0)) {
@@ -230,13 +228,11 @@ void i2s_test(void) {
230228
I2SClass i2s;
231229

232230
i2s.setPins(uart1_rx_pin, uart1_tx_pin, -1);
233-
234231
i2s.setTimeout(1000);
235232
if (!i2s.begin(I2S_MODE_STD, 16000, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO)) {
236233
}
237234
#endif
238235
teardown_test();
239-
delay(500); Serial.println("Exting I2S driver..."); delay(500);
240236
}
241237

242238
void i2c_test(void) {
@@ -287,34 +283,18 @@ void setup() {
287283
Serial1.onReceive(onReceive_cb);
288284
uart_internal_loopback(1, true);
289285

290-
Serial.println("starting gpio_test()");
291286
gpio_test();
292-
Serial.println("starting sigmadelta_test()");
293287
sigmadelta_test();
294-
Serial.println("starting ledc_test()");
295288
ledc_test();
296-
Serial.println("starting rmt_test()");
297289
rmt_test();
298-
Serial.println("\t ==>starting i2s_test()");
299-
i2s_test(); // apos esta linha temos um [E][esp32-hal-periman.c:122] perimanSetPinBus(): Invalid pin: 255
300-
Serial.println("\t ==>Back to setup()");
301-
Serial.println("\t ==>starting spi_test()");
290+
i2s_test();
302291
spi_test();
303-
Serial.println("\t ==>starting i2c_test()");
304292
i2c_test();
305-
Serial.println("\t ==>ended i2c_test()");
306-
Serial.println("starting adc_oneshot_test()");
307293
adc_oneshot_test();
308-
Serial.println("starting adc_continuous_test()");
309294
adc_continuous_test();
310-
Serial.println("starting dac_test()");
311295
dac_test();
312-
Serial.println("starting touch_test()");
313296
touch_test();
314-
Serial.println("starting gpio_test()");
315297

316298
// Print to Serial1 to avoid buffering issues
317299
Serial1.println("Peripheral Manager test done");
318300
}
319-
320-
void loop() {}

0 commit comments

Comments
 (0)
Please sign in to comment.