commit 7354ab187ed701ae041b45a0a6603878ab9b165d and commit
1e2f06718103e7028809012a69b7ac932e9ae537 added code to skip all
remaining channels when the channel number is -1. This adds support for
testing that using the example app. The BL602 driver's first channel is
channel 0, so this also allows the example app to select the first
channel.
commit d8199fe460 changed Kconfig, but it
looks like pwm_main.c should have been changed too. This adds support
for the 5th and 6th channels to the code, and adds an error if more than
6 channels are configured.
commit 36d4bfa774 set a hostname to work
around getaddrinfo failing. getaddrinfo returns a non-zero value on
error, and there should be an early return after the error message is
printed.
Fix the following nxstyle issue on the file:
error: Operator/assignment must be followed with whitespace
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
Fix the following printfs, as reported by cppcheck:
canutils/libobd2/obd_decodepid.c:85:9: error: printf format string requires 1 parameter but only 0 are given. [wrongPrintfScanfArgNum]
printf("Supported PIDs: %08X\n");
^
canutils/libobd2/obd_decodepid.c:114:9: error: printf format string requires 2 parameters but only 1 is given. [wrongPrintfScanfArgNum]
printf("Throttle position = %d\% \n", (100 * dev->data[3])/255);
^
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
cppcheck reports the following error:
fsutils/ipcfg/ipcfg_binary.c:332:15: error: Uninitialized variable: fd [uninitvar]
DEBUGASSERT(fd >= 0 && ipv6cfg != NULL);
Update the DEBUGASSERT() to match that of ipcfg_read_binary_ipv4(). fd is
uninitilized and doesn't need to be checked here.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
test API:
void sched_note_string(FAR const char *buf);
void sched_note_dump(uint32_t module, uint8_t event,
FAR const void *buf, size_t len);
void sched_note_printf(FAR const char *fmt, ...) printflike(1, 2);
void sched_note_bprintf(uint32_t module, uint8_t event,
FAR const char *fmt, ...) printflike(3, 4);
https://github.com/apache/incubator-nuttx/pull/4963
suggestion:
1. add "&" after the command when running this example.
2. must enable SCHED_INSTRUMENTATION_DUMP, and that enable CONFIG_SYSTEM_TRACE can help you view log.
Modulo operation used to calculate digits after decimal point,
but if that result is <10, a leading zero wasn't added, giving a
wrong value.
Same as 34c7bec0dc
but on the example app.