fix minor bug in add_repeating_timer_us, and add some comments #621

Merged
kilograham merged 5 commits from issue_614 into develop 2021-10-25 09:32:02 -05:00
kilograham commented 2021-10-19 17:38:49 -05:00 (Migrated from github.com)
No description provided.
Wren6991 (Migrated from github.com) reviewed 2021-10-19 17:38:49 -05:00
kilograham commented 2021-10-19 17:39:01 -05:00 (Migrated from github.com)

fixes #614

fixes #614
lurch (Migrated from github.com) reviewed 2021-10-19 18:34:07 -05:00
@ -416,9 +416,12 @@ void alarm_pool_destroy(alarm_pool_t *pool);
* @param time the timestamp when (after which) the callback should fire
lurch (Migrated from github.com) commented 2021-10-19 18:34:06 -05:00

Perhaps add a comma after "returning"? The first time I read it, I thought it meant that "if the timestamp happens before or during this method call" was what was being returned, IYSWIM.

Perhaps add a comma after "returning"? The first time I read it, I thought it meant that "if the timestamp happens before or during this method call" was what was being returned, IYSWIM.
lurch (Migrated from github.com) reviewed 2021-10-19 18:36:58 -05:00
@ -219,18 +219,26 @@ alarm_id_t alarm_pool_add_alarm_at(alarm_pool_t *pool, absolute_time_t time, ala
do {
lurch (Migrated from github.com) commented 2021-10-19 18:36:57 -05:00

Repeated "otherwise"

Repeated "otherwise"
lurch (Migrated from github.com) reviewed 2021-10-19 18:37:34 -05:00
@ -219,18 +219,26 @@ alarm_id_t alarm_pool_add_alarm_at(alarm_pool_t *pool, absolute_time_t time, ala
do {
lurch (Migrated from github.com) commented 2021-10-19 18:37:34 -05:00

"this is does mean" ??

"this is does mean" ??
lurch (Migrated from github.com) reviewed 2021-10-19 18:38:54 -05:00
@ -302,7 +314,9 @@ bool alarm_pool_add_repeating_timer_us(alarm_pool_t *pool, int64_t delay_us, rep
out->user_data = user_data;
lurch (Migrated from github.com) commented 2021-10-19 18:38:53 -05:00

is -> if ?

is -> if ?
kilograham (Migrated from github.com) reviewed 2021-10-19 18:44:44 -05:00
@ -416,9 +416,12 @@ void alarm_pool_destroy(alarm_pool_t *pool);
* @param time the timestamp when (after which) the callback should fire
kilograham (Migrated from github.com) commented 2021-10-19 18:44:43 -05:00

reordered because the comma didn't seem right

reordered because the comma didn't seem right
lurch (Migrated from github.com) reviewed 2021-10-19 19:10:16 -05:00
@ -462,9 +468,12 @@ static inline alarm_id_t alarm_pool_add_alarm_in_us(alarm_pool_t *pool, uint64_t
* @param ms the delay (from now) in milliseconds when (after which) the callback should fire
lurch (Migrated from github.com) commented 2021-10-19 19:10:16 -05:00

nitpick: seems to be an accidental unindent here?

nitpick: seems to be an accidental unindent here?
lurch (Migrated from github.com) reviewed 2021-10-19 19:14:07 -05:00
@ -462,9 +468,12 @@ static inline alarm_id_t alarm_pool_add_alarm_in_us(alarm_pool_t *pool, uint64_t
* @param ms the delay (from now) in milliseconds when (after which) the callback should fire
lurch (Migrated from github.com) commented 2021-10-19 19:14:07 -05:00

I see that you've got two variations of this comment - one that uses "timestamp" and one that uses "timeout". Was this function (alarm_pool_add_alarm_in_ms) supposed to use the "timeout" variant? (I see that add_alarm_in_ms uses the "timeout" variant, so presumably at least one of them needs changing? 🤷 )

I see that you've got two variations of this comment - one that uses "timestamp" and one that uses "timeout". Was this function (`alarm_pool_add_alarm_in_ms`) supposed to use the "timeout" variant? (I see that `add_alarm_in_ms` uses the "timeout" variant, so presumably at least one of them needs changing? :shrug: )
kilograham (Migrated from github.com) reviewed 2021-10-20 17:28:01 -05:00
@ -462,9 +468,12 @@ static inline alarm_id_t alarm_pool_add_alarm_in_us(alarm_pool_t *pool, uint64_t
* @param ms the delay (from now) in milliseconds when (after which) the callback should fire
kilograham (Migrated from github.com) commented 2021-10-20 17:28:01 -05:00

actually i made it more confusing they should all say "alarm time"

actually i made it more confusing they should all say "alarm time"
lurch commented 2021-10-21 06:08:55 -05:00 (Migrated from github.com)

I can't comment on the code, but the comments LGTM now 👍

I can't comment on the code, but the comments LGTM now :+1:
liamfraser (Migrated from github.com) approved these changes 2021-10-25 09:18:28 -05:00
liamfraser (Migrated from github.com) left a comment

LGTM. Nice comments!

LGTM. Nice comments!
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!621
No description provided.