eBoard
①⑧⑨
Written for SIA 2017/2018
Main Page
Pages
Tutorials
Namespaces
Classes
Files
File List
File Members
eagle_Assert.h
Go to the documentation of this file.
1
#ifndef EAGLE_EBOARD_HELPLIB_ASSERT
2
#define EAGLE_EBOARD_HELPLIB_ASSERT
3
12
//=====================================================================================================================================================
13
// _assert
14
//=====================================================================================================================================================
15
16
#include <assert.h>
34
void
__assert
(
const
char
*func_call,
const
char
*file_call,
optVAL_t
lineno_call,
const
char
*sexp_call);
35
37
void
__assert
(
const
char
*func_call,
const
char
*file_call,
optVAL_t
lineno_call,
const
char
*sexp_call){
38
Serial.print(
"Error with: "
); Serial.print(func_call);
39
Serial.print(
" in "
); Serial.print(file_call);
40
Serial.print(
" >>"
);
41
Serial.println(sexp_call);
42
if
(strcmp(func_call,
"checkIdx"
)==0){
43
Serial.println(
" This happens if an out of bounds exception"
);
44
Serial.println(
" has occured. Following pins shouldn't be used:"
);
45
Serial.print(
" D"
+
PIN_BLUETOOTH_RX
);Serial.print(
"&"
);
46
Serial.print(
"D"
);Serial.print(
PIN_BLUETOOTH_TX
);
47
Serial.println(
" : Used for Bluetooth communication"
);
48
Serial.print(
" D"
);Serial.print(
PIN_MOTOR_DIR
);Serial.print(
"&"
);
49
Serial.print(
"D"
);Serial.print(
PIN_MOTOR_SPE
);
50
Serial.println(
" : Used for main motor control"
);
51
#if EBOARD_USE_SPI > 0x0
52
Serial.print(
" D10-13"
);
53
Serial.println(
": Used for smart-servo-shield"
);
54
#endif
55
}
else
if
(strcmp(func_call,
"readPin"
)==0){
56
Serial.println(
"You've tried to access an analogPin that isn't present on the board you're currently working on!"
);
57
}
58
Serial.flush();
59
abort();
// halt after outputting information
60
}
62
63
#endif
PIN_MOTOR_SPE
#define PIN_MOTOR_SPE
Definition:
eBoard.h:576
__assert
void __assert(const char *func_call, const char *file_call, optVAL_t lineno_call, const char *sexp_call)
[DEBUG_MODE] custom assert message
PIN_BLUETOOTH_RX
#define PIN_BLUETOOTH_RX
Definition:
eBoard.h:544
PIN_MOTOR_DIR
#define PIN_MOTOR_DIR
Definition:
eBoard.h:569
PIN_BLUETOOTH_TX
#define PIN_BLUETOOTH_TX
Definition:
eBoard.h:555
optVAL_t
int optVAL_t
Definition:
eBoard.h:137
eBoard
source
eagle_Assert.h
[WIP-510]
EagleoutIce
22.06.2018 00:28:45