Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to handle %n in sscanf #223

Closed
wants to merge 1 commit into from

Conversation

julianoes
Copy link
Contributor

A %n was ignored in sscanf, so the multicopter mixer wasn't parsed correctly.
This is happening because
while (*fmt && *buf)
stopped when the buffer is empty but *fmt still contains the %n

Please check, if the fix makes sense.

Thanks go to Richard who travelled all the way from Zurich to San Diego just to help me!

@px4dev
Copy link
Contributor

px4dev commented Mar 15, 2013

Please cc: the NuttX maintainer on this one - it should probably go upstream as well.

@LorenzMeier
Copy link
Member

Thanks, after discussing this with the NuttX maintainer we found a (still not completely general) different workaround, which is merged. We still want to make it general, opened issue #227 to track this.

PX4BuildBot added a commit that referenced this pull request Feb 7, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@5e9ad05

Changes from PX4/NuttX (PX4/NuttX@7b36108) in current PX4/master (ca0b570)
PX4/NuttX@7b36108...5e9ad05

5e9ad05889 (HEAD, origin/master) Merge branch 'master' of github.com:apache/incubator-nuttx
3b311ab tools/testbuild.sh: use function to call make and fail handle in common
499607d S32K add support for Nxp drone boards (#224)
2d5141b Merge pull request #222 from han1raaijmakers/imxrtI2C
cabd692 Merge pull request #223 from han1raaijmakers/KinetisTJA110X
d79e673 imxrt added missing i2c prescale mask
513475c Kinetis renamed TJA1100 to TJA110X registers
486a05e getopt: Fix a typo in a comment
7f91a73 arch/arm/include/stm32f010g0/chip.h: Add support for STM32F030CC
ac2aec9 Refine Kconfig under drivers folder

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@960a92c

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (ca0b570)
PX4/NuttX-apps@91b6ad6...960a92c

960a92c6 (HEAD -> master, origin/master) Make SO_REUSEADDR not mandatory in netlib
a5dff52a Change unimplemented requests behaviour in gs2200m
2f4b309b gs2200m: Retry indefinately on GS2200M_IOC_ASSOC failure
e738fbed graphics/littlevgl/Makefile: update lvgl.h dependency to fix parallel build break
bb3cd0a4 apps: elf: Fix stack corruption in task test
bf3e6e23 Improvements for telnet server
43a36996 nettest: Avoid conflicts with host definitions
bcc0f5c0 nettest: Avoid common symbols
e0adf5ee Remove all CONFIG_NET_HAVE_REUSEADDR guard
1d6fcfac Build system: Reference tools/define.sh through DEFINE macro
PX4BuildBot added a commit that referenced this pull request Feb 9, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master_nxp_drone_boards
 - PX4/NuttX@5e9ad05

Changes from PX4/NuttX (PX4/NuttX@fdf1837) in current PX4/master (6c76f99)
PX4/NuttX@fdf1837...5e9ad05

5e9ad05889 (HEAD, origin/master_nxp_drone_boards) Merge branch 'master' of github.com:apache/incubator-nuttx
3b311ab tools/testbuild.sh: use function to call make and fail handle in common
499607d S32K add support for Nxp drone boards (#224)
2d5141b Merge pull request #222 from han1raaijmakers/imxrtI2C
cabd692 Merge pull request #223 from han1raaijmakers/KinetisTJA110X
d79e673 imxrt added missing i2c prescale mask
513475c Kinetis renamed TJA1100 to TJA110X registers
486a05e getopt: Fix a typo in a comment
7f91a73 arch/arm/include/stm32f010g0/chip.h: Add support for STM32F030CC
ac2aec9 Refine Kconfig under drivers folder

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master_nxp_drone_boards
 - PX4/NuttX-apps@960a92c

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (6c76f99)
PX4/NuttX-apps@91b6ad6...960a92c

960a92c6 (HEAD -> master_nxp_drone_boards, origin/master_nxp_drone_boards) Make SO_REUSEADDR not mandatory in netlib
a5dff52a Change unimplemented requests behaviour in gs2200m
2f4b309b gs2200m: Retry indefinately on GS2200M_IOC_ASSOC failure
e738fbed graphics/littlevgl/Makefile: update lvgl.h dependency to fix parallel build break
bb3cd0a4 apps: elf: Fix stack corruption in task test
bf3e6e23 Improvements for telnet server
43a36996 nettest: Avoid conflicts with host definitions
bcc0f5c0 nettest: Avoid common symbols
e0adf5ee Remove all CONFIG_NET_HAVE_REUSEADDR guard
1d6fcfac Build system: Reference tools/define.sh through DEFINE macro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants