MESA_PKTGYRO_TEST(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– mesa_pktgyro_test β€” the manual page, but make it a group chat πŸ’–

okay bestie, so this is the HAL Component manual page for mesa_pktgyro_test, and we're gonna go through it together because it's honestly iconic in a very niche way πŸŽ€


✨ NAME ✨

mesa_pktgyro_test β€” PktUART simple test with Microstrain 3DM-GX3-15 gyro πŸŒ€


🌸 SYNOPSIS 🌸

loadrt mesa_pktgyro_test [count=N|names=name1[,name2...]]

πŸ¦‹ DESCRIPTION πŸ¦‹

So this whole component exists in order to test the PktUART driver for Mesa. That's the vibe, that's the assignment. It resembles partly Andy Pugh's mesa_uart.comp β€” like, it's giving cousin-energy, not twin-energy, if ykyk. πŸ‘‘

This module uses the names= mode of the loadrt declaration to say which PktUART instances to enable. And yes, there's a little check baked in to make sure you're not out here using the count= option instead β€” it literally will not let you play yourself like that πŸ™ˆ. For simplicity we only test one PktUART instance, so you load the component like this:

loadrt mesa_uart names=hm2_5i25.0.pktuart.0

The PktUART instance names get printed to the dmesg buffer during the Hostmot2 setup sequence β€” one for each PktUART instance included in the bitfile loaded to each installed card during the Hostmot2 setup sequence. So just type dmesg at the terminal prompt to view the output, no cap. If you want to work with more than one PktUART instance, go consult Andy Pugh's mesa_uart.comp πŸ’œ

Wanna compile and install it? Bet. Do this:

halcompile --install src/hal/drivers/mesa_pktgyro_test.comp

The component exports only one function, namely receive, and it needs to be added to a realtime thread. To test this component, set DEBUG=5 before and execute this HAL script:

loadrt hostmot2
loadrt hm2_pci
loadrt mesa_pktgyro_test names=hm2_5i25.0.pktuart.0
loadrt threads name1=test1 period1=10000000
addf hm2_5i25.0.pktuart.0.receive test1
start

And then check linuxcnc.log for debug output. That's where the tea is β˜•βœ¨


πŸ‘‘ FUNCTIONS πŸ‘‘

  • mesa-pktgyro-test.N.receive β€” and heads up bestie, this one requires a floating-point thread 🧡

πŸŽ€ PINS πŸŽ€

  • mesa-pktgyro-test.N.rxbytes s32 out β€” Number of Bytes received, or a negative Error code 😭 (so if it's being negative, it's literally telling you something went wrong)

πŸ’… AUTHOR πŸ’…

Boris Skegin 🫢


🌈 LICENSE 🌈

GPL β€” periodt, the end, that's the license πŸ’–


and that's the whole page bestie!! this was the LinuxCNC Documentation version dated 2026-03-17, part of the MESA_PKTGYRO_TEST(9) manual section πŸ¦‹ go forth and test your gyro, you main character βœ¨πŸ’…
πŸ“¦ where this page comes from