Ant has a channel period, which can be set to determine how many times per second the same data is sent.
However, we have not found a way to change this one-second interval.
If anyone knows, please let me know.
thank you
Ant has a channel period, which can be set to determine how many times per second the same data is sent.
However, we have not found a way to change this one-second interval.
If anyone knows, please let me know.
thank you
What app type are you using? In a DF, you can't use timers and compute() only runs every second. In a device app, you should be able to use a timer.
I use the watch app
It seems to send 1 packet per second, but I would like to make it shorter than 1 second.
Are you using a timer to send the data? If not, how are you triggering the send?
Hi, I used the compute() to trigger the send. For each compute() (1hz) I package 4 ant messages and use sendAcknowledge() 4 times to send these 4 messages. It works on simulator but does not work on Garmin Edge devices (I only have Edge 1040 and 530). It seems only the first message sent by GenericChannel.sendAcknowledge(message) can be sent out. I changed the messagePeriod (8192 or 4096): not working.
I've not done that much with ANT or an ANT stick in the sim, but a few things.
In general, things may happen at different speeds in the sim than on a real device. You'll see this with things like makeWebRequest.
Not sure, but the ANT stick or the interface to the ANT stick may have some logic such that if it's got multiple things to send, it sends one, waits for an ack, then sends the next, where on a real device, it just sends them all and only the 1st one is seen.
I do a bunch with BLE, and there you have to implement your own queueing. You can't just send 4 things at once. Send one, and wait of an ack before you send the next.
What I'd try as a test, is make compute() a bit smarter. If there are 4 things to send, send the 1st on the 1st call to compute(), the 2nd on the second call, etc. With 4 things, this would take 4 seconds,