Skip to content

Commit 29ecc07

Browse files
committed
Version 0.7 of renesas code
fix some diagnostic code
1 parent 2f8d499 commit 29ecc07

File tree

2 files changed

+6
-25
lines changed

2 files changed

+6
-25
lines changed

extras/functions_generator_firmware/SKr3_waves/SKr3_waves.ino

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/* ########################################################################## */
3030
#define USE_CHAT_AT
3131
#define USE_TIMER
32-
#define USE_DEBUG_CODE
32+
//#define USE_DEBUG_CODE
3333

3434
/* ########################################################################## */
3535
/* _____________________________ OTHERS DEFINES _____________________________ */
@@ -45,7 +45,7 @@
4545

4646

4747
// Firmware version
48-
uint8_t version[2]={0,6};
48+
uint8_t version[2]={0,7};
4949

5050
char command=0;
5151
byte data[6];
@@ -179,22 +179,13 @@ void timer_callback(timer_callback_args_t *arg) {
179179
/* -------------------------------------------------------------------------- */
180180
void set_up_timer() {
181181
/* -------------------------------------------------------------------------- */
182-
183182
uint8_t type;
184183
int8_t num = FspTimer::get_available_timer(type);
185-
186-
187184
if(num >= 0) {
188-
Serial.print("Timer Available ");
189-
Serial.println(type);
190185
timer.begin(TIMER_MODE_PERIODIC, type, num, 1000,50 , timer_callback);
191186
timer.setup_overflow_irq();
192-
if(timer.open()) {
193-
Serial.println("FspTimer opened");
194-
}
195-
if(timer.start()) {
196-
Serial.println("FspTimer started");
197-
}
187+
timer.open();
188+
timer.start();
198189
}
199190

200191
CScheduler::getInstance().add(task10ms,TASK_10ms);
@@ -274,8 +265,6 @@ void setup() {
274265
#ifdef USE_TIMER
275266
set_up_timer();
276267
#endif
277-
278-
279268

280269
generate_wave();
281270
pinMode(PH_1,INPUT);

extras/functions_generator_firmware/SKr3_waves/chAt_cmds.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "pin_def.h"
77
#include "led_gauge.h"
88
#include "led_array.h"
9-
#include <string>
9+
1010

1111
using namespace std;
1212

@@ -72,15 +72,7 @@ void CAtWrapper::add_cmds() {
7272
v = 0;
7373
}
7474
v = map(v, 0,ADC_RES, 0, 10);
75-
//Serial.println(v);
76-
77-
string val = std::to_string(v);
78-
79-
//Serial.println(val.c_str());
80-
//Serial.println("-----");
81-
delay(1);
82-
83-
srv.write_str((const char *)(val.c_str()));
75+
Serial.print(v);
8476
srv.write_line_end();
8577
return chAT::CommandStatus::OK;
8678
}

0 commit comments

Comments
 (0)