Posts Tagged ‘ant’

Tacx ANT+ antenna review

Saturday, September 14th, 2019 | Reviews, Video

The Tacx ANT+ antenna is an ANT+ dongle that connects to your computer via USB. It is designed to allow you to connect your ANT+ sensors such as speed, cadence, heart rate, etc, to your PC or laptop so that you can run Zwift or any other computer-based bike training software.

The problem with most dongles is the drop-outs. This is a disaster for Zwift as it can ruin your intervals or worse when in a group ride, get dropped by the peloton, at which point you have no chance of getting back on again.

The Tacx unit tries to overcome this by providing a long cable so that you can plug it in and move it closer to your bike or smart trainer. It’s a heavy unit with a sturdy base so it will not get knocked around. The unit feels solid and high-quality.

That said, I was still getting drop-outs. If anything, they were worse than when I was connecting my gear with Bluetooth. The Garmin head unit on my bike receives the signal the whole time, so it only seems to be the computer connectivity that is the problem.

Conditional tasks in Ant

Thursday, February 28th, 2013 | Programming, Tech

If you’re using Ant build scripts, there is a good chance that you will want to do some tasks conditionally – for example, if you’re using CI you will want to run your unit tests every time some code is committed – but you might only want to regenerate documentation or update a stakeholders’ preview build every night.

There is a lot of talk about conditional tags, but all these really allow you to do is set even more variables. You can use if/then/else from Ant-Contrib but that involves adding extra libraries and complicating the issue.

Actually, it turns out it is really simple to set up conditional tasks in your build process. All you need to do is call the task, but in the task header use the if attribute.

For example, I have a build task which calls all the other tasks.

<target name="build" depends="clean,checkout,nightly,phpunit,documentation" />

Even though I’m running this every time, I’m calling the “nighty” task. Below shows how I define that.

<target name="nightly" if="${env.NIGHTLY}">

Finally, in my Jenkins CI install, I make the project a parameterised build, and add a boolean called NIGHTLY that defaults to false. I can then also trigger a build by cron that specifies the NIGHTLY parameter as true, so that when it runs on a night, it runs the additional tasks as well.