Page 1 of 1

Nitpicking the ChibiOS code

Posted: Tue Oct 25, 2016 10:21 am
by thor.thau
Hi,

I am a very detail oriented person and some times I notice some insignificant details in the ChibiOS code. One example is the use of defined(__DOXIGEN__) instead of defined(__DOXYGEN__) in ./test/rt/testbuild/chconf.h.

Do you want such feedback? If yes would you like me to group such minor changes together instead of reporting every detail separate?

Re: Nitpicking the ChibiOS code

Posted: Tue Oct 25, 2016 11:18 am
by Giovanni
Hi,

It is not functionally relevant but still a bug, it should be reported as such, I appreciate attention to details.

It is OK to group similar problems in a single report.

Fixed that problem in the various branches.

Giovanni

Re: Nitpicking the ChibiOS code

Posted: Sun Oct 30, 2016 7:39 am
by kimmoli
So, someone asked for nitpicking?
STM RTCv1 documentation refers to RTCTime, function uses RTCDateTime ...

in os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.c

Code: Select all

 * @brief   Set current time.
 * @param[in] timespec  pointer to a @p RTCTime structure
...
void rtc_lld_set_time(RTCDriver *rtcp, const RTCDateTime *timespec) {


Code: Select all

 * @brief   Get current time.
 * @param[in] timespec  pointer to a @p RTCTime structure
...
void rtc_lld_get_time(RTCDriver *rtcp, RTCDateTime *timespec) {

Re: Nitpicking the ChibiOS code

Posted: Sun Oct 30, 2016 7:50 am
by Giovanni
Thanks :)

Fixed in all branches.

Giovanni

Re: Nitpicking the ChibiOS code

Posted: Mon Dec 12, 2016 12:42 pm
by thor.thau
Spelling error in the main page of the generated reference manual by Doxygen.

ChibiOS: trunk
SVN: trunk@9952

Code: Select all

diff --git a/doc/hal/src/main.dox b/doc/hal/src/main.dox
index cd8f735..3a96776 100644
--- a/doc/hal/src/main.dox
+++ b/doc/hal/src/main.dox
@@ -18,7 +18,7 @@
 */

 /**
- * @mainpage Introdution
+ * @mainpage Introduction
  * @author Giovanni Di Sirio ([email protected]).
  *
  * <h2>Features</h2>
diff --git a/doc/nil/src/main.dox b/doc/nil/src/main.dox
index 7f137bd..b28f031 100644
--- a/doc/nil/src/main.dox
+++ b/doc/nil/src/main.dox
@@ -18,7 +18,7 @@
 */
 
 /**
- * @mainpage Introdution
+ * @mainpage Introduction
  * @author Giovanni Di Sirio ([email protected]).
  *
  * <h2>Why Nil?</h2>
diff --git a/doc/rt/src/main.dox b/doc/rt/src/main.dox
index 2d222d3..1338ec6 100644
--- a/doc/rt/src/main.dox
+++ b/doc/rt/src/main.dox
@@ -18,7 +18,7 @@
 */
 
 /**
- * @mainpage Introdution
+ * @mainpage Introduction
  * @author Giovanni Di Sirio ([email protected]).
  *
  * <h2>Chibi ?</h2>

Re: Nitpicking the ChibiOS code

Posted: Mon Dec 12, 2016 12:49 pm
by Giovanni
Hi,

Fixed thanks.

Giovanni

Re: Nitpicking the ChibiOS code

Posted: Wed Jan 11, 2017 12:18 pm
by thor.thau
ChibiOS: 16.1.6
SVN: branches/stable_16.1.x@10005
Module: streams/chprintf

There are some errors in the comments to function chsnprintf. For example the comments say it is a vprintf implementation.

Code: Select all

diff --git a/os/hal/lib/streams/chprintf.c b/os/hal/lib/streams/chprintf.c
index b2c4478da..9baca6b78 100644
--- a/os/hal/lib/streams/chprintf.c
+++ b/os/hal/lib/streams/chprintf.c
@@ -312,8 +312,7 @@ int chprintf(BaseSequentialStream *chp, const char *fmt, ...) {
 
 /**
  * @brief   System formatted output function.
- * @details This function implements a minimal @p vprintf()-like functionality
- *          with output on a @p BaseSequentialStream.
+ * @details This function implements a minimal @p snprintf()-like functionality.
  *          The general parameters format is: %[-][width|*][.precision|*][l|L]p.
  *          The following parameter types (p) are supported:
  *          - <b>x</b> hexadecimal integer.
@@ -327,13 +326,13 @@ int chprintf(BaseSequentialStream *chp, const char *fmt, ...) {
  *          - <b>c</b> character.
  *          - <b>s</b> string.
  *          .
- * @post    @p str is NUL-terminated, unless @p size is 0.
+ * @post    @p str is NULL-terminated, unless @p size is 0.
  *
  * @param[in] str       pointer to a buffer
  * @param[in] size      maximum size of the buffer
  * @param[in] fmt       formatting string
  * @return              The number of characters (excluding the
- *                      terminating NUL byte) that would have been
+ *                      terminating NULL byte) that would have been
  *                      stored in @p str if there was room.
  *
  * @api

Re: Nitpicking the ChibiOS code

Posted: Wed Jan 11, 2017 1:52 pm
by Giovanni
Hi,

Fixed the comment but NUL is intentional, it is the name of character zero.

Giovanni