M History.md +7 -0
@@ 1,6 1,13 @@
# Release History for ruby-ant
---
+## v0.4.0 [2021-11-05] Michael Granger <ged@FaerieMUD.org>
+
+Enhancements:
+
+- Add advanced burst support (with a customized ANT-SDK).
+
+
## v0.3.0 [2021-10-11] Michael Granger <ged@FaerieMUD.org>
Enhancements:
M README.md +4 -1
@@ 24,7 24,10 @@ manner.
* [Garmin USB ANT Stick][antstick]
* [ANT SDK][antsdk]
-Note that we had trouble compiling the latest ANT SDK on some platforms, so we are currently using a modified version of it with a reworked build system for MacOS and FreeBSD. That is available under the same licensing terms at:
+Note that we had trouble compiling the latest ANT SDK on some platforms, so we
+are currently using a modified version of it with a reworked build system for
+MacOS and FreeBSD, and with implementations for advanced burst and checking
+initialization status. That is available under the same licensing terms at:
https://github.com/RavnGroup/Garmin-ANT-SDK
M ant-wireless.gemspec +3 -3
@@ 1,16 1,16 @@
# -*- encoding: utf-8 -*-
-# stub: ant-wireless 0.4.0.pre.20211028151242 ruby lib
+# stub: ant-wireless 0.5.0.pre.20211105114058 ruby lib
# stub: ext/ant_ext/extconf.rb
Gem::Specification.new do |s|
s.name = "ant-wireless".freeze
- s.version = "0.4.0.pre.20211028151242"
+ s.version = "0.5.0.pre.20211105114058"
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "bug_tracker_uri" => "https://todo.sr.ht/~ged/ruby-ant-wireless", "changelog_uri" => "https://deveiate.org/code/ant-wireless/History_md.html", "documentation_uri" => "https://deveiate.org/code/ant-wireless", "homepage_uri" => "https://sr.ht/~ged/ruby-ant-wireless/", "source_uri" => "https://hg.sr.ht/~ged/ruby-ant-wireless" } if s.respond_to? :metadata=
s.require_paths = ["lib".freeze]
s.authors = ["Michael Granger".freeze, "Mahlon E. Smith".freeze]
- s.date = "2021-10-28"
+ s.date = "2021-11-05"
s.description = "A binding for the ANT ultra-low power wireless protocol via the Garmin USB ANT Stick. ANT can be used to send information wirelessly from one device to another device, in a robust and flexible manner.".freeze
s.email = ["ged@FaerieMUD.org".freeze, "mahlon@martini.nu".freeze]
s.extensions = ["ext/ant_ext/extconf.rb".freeze]
M ext/ant_ext/channel.c +5 -1
@@ 605,6 605,7 @@ rant_channel_send_broadcast_data( VALUE
static VALUE
rant_channel_send_advanced_transfer( int argc, VALUE *argv, VALUE self )
{
+#ifdef HAVE_ANT_SENDADVANCEDBURST
rant_channel_t *ptr = rant_get_channel( self );
VALUE data = Qnil, packets = Qnil;
unsigned char *data_s;
@@ 634,13 635,16 @@ rant_channel_send_advanced_transfer( int
rant_log_obj( self, "warn", "Sending advanced burst packets (%d-byte messages): %s",
ucStdPcktsPerSerialMsg * 8, data_s );
- if ( !ANT_SendAdvancedBurstTransfer_RTO(ptr->channel_num, data_s, usNumDataPackets,
+ if ( !ANT_SendAdvancedBurst_RTO(ptr->channel_num, data_s, usNumDataPackets,
ucStdPcktsPerSerialMsg, ADVANCED_BURST_TIMEOUT) )
{
rant_log_obj( self, "error", "failed to send advanced burst transfer." );
}
return Qtrue;
+#else
+ rb_notimplement();
+#endif
}
M ext/ant_ext/extconf.rb +4 -0
@@ 18,6 18,10 @@ have_func( 'ANT_IsInitialized', 'libant.
have_func( 'ANT_LibVersion', 'libant.h' )
have_func( 'ANT_GetDeviceSerialNumber', 'libant.h' )
+# Look for a custom advanced burst function, as the official SDK has it in the
+# header but doesn't actually implement it.
+have_func( 'ANT_SendAdvancedBurst', 'libant.h' )
+
# Ref: https://bugs.ruby-lang.org/issues/17865
$CPPFLAGS << " -Wno-compound-token-split-by-macro "
M lib/ant.rb +1 -1
@@ 12,7 12,7 @@ module Ant
extend Loggability
# Package version
- VERSION = '0.3.0'
+ VERSION = '0.4.0'
# A Range for matching valid ANT device numbers
VALID_DEVICE_NUMBERS = ( 0...65535 ).freeze