Skip to content

Commit d3aff07

Browse files
author
camilo
committed
minor doc fixes and SA rev
1 parent 1c92405 commit d3aff07

File tree

4 files changed

+28
-24
lines changed

4 files changed

+28
-24
lines changed

src/include/input.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ namespace qOS {
468468
/*! @endcond */
469469
/**
470470
* @brief Constructor for the input-watcher instance
471-
* @param[in] timeDebounce The specified time to bypass the
472-
* bounce of the digital input channels
471+
* @param[in] dt The specified time to bypass the bounce of the
472+
* digital input channels
473473
*/
474474
explicit watcher( const qOS::duration_t dt = 100_ms ) : debounceTime( dt ) {}
475475
/**
@@ -483,8 +483,8 @@ namespace qOS {
483483
* on analog input channels to trigger input::event::STEP and
484484
* input::event::DELTA events.
485485
*/
486-
watcher( const digitalReaderFcn_t& rDigital, const analogReaderFcn_t& rAnalog, const qOS::duration_t timeDebounce = 100_ms ) :
487-
debounceTime( timeDebounce ), digitalReader( rDigital ), analogReader( rAnalog ) {}
486+
watcher( const digitalReaderFcn_t& rDigital, const analogReaderFcn_t& rAnalog, const qOS::duration_t dt = 100_ms ) :
487+
debounceTime( dt ), digitalReader( rDigital ), analogReader( rAnalog ) {}
488488
/**
489489
* @brief Add a channel to the watcher instance
490490
* @param[in] c The input-Channel to watch

src/include/kernel.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,16 @@ namespace qOS {
267267
#endif
268268

269269
/**
270-
* @brief Add an input-watcher so that its function is executed by
271-
* the kernel
270+
* @brief Add an input-watcher as a task so that its function is
271+
* executed by the kernel
272272
* @note The input-watcher is considered as an always-active task
273+
* @param[in] Task The task node.
273274
* @param[in] w The input watcher.
275+
* @param[in] p Task priority Value. [0(min) - @c Q_PRIORITY_LEVELS (max)]
276+
* @param[in] s Specifies the initial operational state of the task
277+
* (taskState::ENABLED_STATE, taskState::DISABLED_STATE,
278+
* taskState::AWAKE_STATE or taskState::AWAKE_STATE(implies taskState::ENABLED_STATE,)).
279+
* @param[in] arg The task arguments.
274280
* @return Returns @c true if success, otherwise returns @c false.
275281
*/
276282
bool add( task &Task, input::watcher &w, const priority_t p = HIGHEST_PRIORITY, const taskState s = taskState::ENABLED_STATE, void *arg = nullptr ) noexcept;

src/input.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ size_t input::watcher::getDigitalChannelsCount( void ) const noexcept
307307
return digitalChannels.length();
308308
}
309309
/*============================================================================*/
310-
/*============================================================================*/
311310
void input::digitalChannel::setInitalState( void ) noexcept
312311
{
313312
auto val = ( nullptr != reader ) ? reader( number ) : -1;

src/logger.cpp

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ namespace qOS {
9595

9696
void _logger::toLog( const void * const p )
9797
{
98-
(void)util::pointerToString( p, buffer );
99-
//(void)util::outputString( writeChar, "p@" );
98+
(void)util::pointerToString( p, buffer ); // skipcq: CXX-C1000
10099
writeChar( nullptr, '@' );
101100
writeChar( nullptr, ':' );
102101
(void)util::outputString( writeChar, buffer ); // skipcq: CXX-C1000
@@ -155,10 +154,10 @@ namespace qOS {
155154
void _logger::toLog( const qOS::task& t )
156155
{
157156
(void)util::outputString( writeChar , "task{ " );
158-
const auto name = t.getName();
157+
const char *name = t.getName();
159158
if ( '\0' == name[ 0 ] ) {
160-
(void)util::pointerToString( &t, buffer );
161-
(void)util::outputString( writeChar, buffer );
159+
(void)util::pointerToString( &t, buffer ); // skipcq: CXX-C1000
160+
(void)util::outputString( writeChar, buffer ); // skipcq: CXX-C1000
162161
}
163162
else {
164163
(void)util::outputString( writeChar , t.getName() );
@@ -196,32 +195,32 @@ namespace qOS {
196195
void _logger::toLog( const qOS::sm::state& s )
197196
{
198197
(void)util::outputString( writeChar , "sm::state{ " );
199-
(void)util::pointerToString( &s, buffer );
198+
(void)util::pointerToString( &s, buffer ); // skipcq: CXX-C1000
200199
(void)util::outputString( writeChar , buffer ); // skipcq: CXX-C1000
201200
(void)util::outputString( writeChar , " } " );
202201
}
203202

204203
void _logger::toLog( const qOS::queue& v )
205204
{
206205
(void)util::outputString( writeChar , "queue{ H: " );
207-
(void)util::pointerToString( v.peek(), buffer );
206+
(void)util::pointerToString( v.peek(), buffer ); // skipcq: CXX-C1000
208207
(void)util::outputString( writeChar , buffer ); // skipcq: CXX-C1000
209208
(void)util::outputString( writeChar , ", count: " );
210-
(void)util::unsignedToString( v.count(), buffer, 10 );
209+
(void)util::unsignedToString( v.count(), buffer, 10 ); // skipcq: CXX-C1000
211210
(void)util::outputString( writeChar , buffer ); // skipcq: CXX-C1000
212211
(void)util::outputString( writeChar , " } " );
213212
}
214213

215214
void _logger::toLog( const qOS::mem::pool& v )
216215
{
217216
(void)util::outputString( writeChar , "mem::pool{ " );
218-
(void)util::pointerToString( v.getPoolArea(), buffer );
217+
(void)util::pointerToString( v.getPoolArea(), buffer ); // skipcq: CXX-C1000
219218
(void)util::outputString( writeChar , buffer ); // skipcq: CXX-C1000
220219
(void)util::outputString( writeChar , ", size: " );
221-
(void)util::unsignedToString( v.getTotalSize(), buffer, 10 );
220+
(void)util::unsignedToString( v.getTotalSize(), buffer, 10 ); // skipcq: CXX-C1000
222221
(void)util::outputString( writeChar , buffer ); // skipcq: CXX-C1000
223222
(void)util::outputString( writeChar , ", free: " );
224-
(void)util::unsignedToString( v.getFreeSize(), buffer, 10 );
223+
(void)util::unsignedToString( v.getFreeSize(), buffer, 10 ); // skipcq: CXX-C1000
225224
(void)util::outputString( writeChar , buffer ); // skipcq: CXX-C1000
226225
(void)util::outputString( writeChar , " } " );
227226
}
@@ -326,7 +325,7 @@ namespace qOS {
326325
}
327326
if ( str != nullptr ) {
328327
(void)util::outputString( writeChar, str );
329-
(void)util::outputString( writeChar, buffer );
328+
(void)util::outputString( writeChar, buffer ); // skipcq: CXX-C1000
330329
}
331330
else {
332331
const unsigned sig = static_cast<unsigned>( v );
@@ -335,14 +334,14 @@ namespace qOS {
335334
const unsigned maxIdx = static_cast<unsigned>( Q_FSM_MAX_TIMEOUTS) - 1U;
336335
const unsigned idx = maxIdx - ( tBase - sig );
337336
(void)util::outputString( writeChar, "SIGNAL_TIMEOUT" );
338-
(void)util::unsignedToString( idx, buffer, 10 );
339-
(void)util::outputString( writeChar, buffer );
337+
(void)util::unsignedToString( idx, buffer, 10 ); // skipcq: CXX-C1000
338+
(void)util::outputString( writeChar, buffer ); // skipcq: CXX-C1000
340339
writeChar( nullptr, ' ' );
341340
}
342341
else {
343342
(void)util::outputString( writeChar, "SIGNAL_USER:" );
344-
(void)util::unsignedToString( sig, buffer, 10 );
345-
(void)util::outputString( writeChar, buffer );
343+
(void)util::unsignedToString( sig, buffer, 10 ); // skipcq: CXX-C1000
344+
(void)util::outputString( writeChar, buffer ); // skipcq: CXX-C1000
346345
writeChar( nullptr, ' ' );
347346
}
348347
}
@@ -377,7 +376,7 @@ namespace qOS {
377376
break;
378377
}
379378
(void)util::outputString( writeChar, str );
380-
(void)util::outputString( writeChar, buffer );
379+
(void)util::outputString( writeChar, buffer ); // skipcq: CXX-C1000
381380
}
382381

383382
void _logger::toLog( const qOS::sm::stateHandler& v )

0 commit comments

Comments
 (0)