Changeset 294 in flair-src for trunk/lib/FlairCore
- Timestamp:
- Jan 9, 2019, 3:38:32 PM (6 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Object.cpp
r15 r294 91 91 if (rt_task_self() != NULL) { 92 92 rt_fprintf(stderr, "\033[%dm", color); 93 if (line) { 94 rt_fprintf(stderr, "%s - line %d, %s: ", function, line, 95 pimpl_->name.c_str()); 96 } else { 97 rt_fprintf(stderr, "%s, %s: ", function, pimpl_->name.c_str()); 93 if(function) { 94 if (line) { 95 rt_fprintf(stderr, "%s - line %d, %s: ", function, line, 96 pimpl_->name.c_str()); 97 } else { 98 rt_fprintf(stderr, "%s, %s: ", function, pimpl_->name.c_str()); 99 } 98 100 } 99 101 rt_vfprintf(stderr, format, *args); … … 103 105 { 104 106 fprintf(stderr, "\033[%dm", color); 105 if (line) { 106 fprintf(stderr, "%s - line %d, %s: ", function, line, 107 pimpl_->name.c_str()); 108 } else { 109 fprintf(stderr, "%s, %s: ", function, pimpl_->name.c_str()); 107 if(function) { 108 if (line) { 109 fprintf(stderr, "%s - line %d, %s: ", function, line, 110 pimpl_->name.c_str()); 111 } else { 112 fprintf(stderr, "%s, %s: ", function, pimpl_->name.c_str()); 113 } 110 114 } 111 115 vfprintf(stderr, format, *args); -
trunk/lib/FlairCore/src/Object.h
r15 r294 18 18 #include <stdarg.h> 19 19 20 //orange printf, with function call and object name display 20 21 #define Warn(...) Warning(__PRETTY_FUNCTION__, __VA_ARGS__) 22 //red printf, with function call and object name display 21 23 #define Err(...) Error(__PRETTY_FUNCTION__, __VA_ARGS__) 24 //green printf, with function call and object name display 22 25 #define Info(...) Information(__PRETTY_FUNCTION__, __LINE__, __VA_ARGS__) 26 27 //orange printf 28 #define SimpleWarn(...) Warning(NULL, __VA_ARGS__) 23 29 24 30 #define TIME_INFINITE 0 … … 140 146 * Green colored Printf(). \n 141 147 * Note that it is better to call Info macro, which automatically fills 142 * function parameter.148 * calling function parameter. 143 149 * 144 150 * \param function name of calling function … … 154 160 * Orange colored Printf(). \n 155 161 * Note that it is better to call Warn macro, which automatically fills 156 * function parameter.162 * calling function parameter. 157 163 * 158 164 * \param function name of calling function … … 166 172 * Red colored Printf(). \n 167 173 * Note that it is better to call Err macro, which automatically fills function 168 * parameter. \n174 * calling parameter. \n 169 175 * After calling this method, ErrorOccured() will always return true. 170 176 * -
trunk/lib/FlairCore/src/Unix_SerialPort.h
r15 r294 35 35 * \param parent parent 36 36 * \param name name 37 * \param device serial device (ex rtser1)37 * \param device serial device (ex /dev/ttyS0) 38 38 */ 39 39 Unix_SerialPort(const Object *parent, std::string port_name,
Note:
See TracChangeset
for help on using the changeset viewer.