Module: RfBeam
- Defined in:
- lib/rfbeam/kld7/constants.rb,
lib/rfbeam.rb,
lib/rfbeam/cli.rb,
lib/rfbeam/version.rb,
lib/rfbeam/kld7/streamer.rb,
lib/rfbeam/kld7/radar_messages.rb,
lib/rfbeam/kld7/detection_params.rb,
lib/rfbeam/kld7/operation_params.rb,
lib/rfbeam/kld7/serial_connection.rb
Overview
rubocop:disable all
Defined Under Namespace
Modules: KLD7 Classes: CLI, Error, Kld7
Constant Summary collapse
- VERSION =
'0.5.8'
Class Method Summary collapse
Instance Method Summary collapse
-
#angle_threshold ⇒ Object
—————– Angle Threshold, -90° to 90°, default = 0 —————–.
- #angle_threshold=(value = 0) ⇒ Object (also: #anth=, #set_angle_threshold, #spth=, #set_speed_threshold)
-
#range_threshold ⇒ Object
—————– Range Threshold, 0 - 100% of Range setting, default = 10 —————–.
- #range_threshold=(value = 10) ⇒ Object (also: #rath=, #set_range_threshold)
-
#speed_threshold ⇒ Object
—————– Speed Threshold, 0 - 100% of speed setting, default = 50 —————–.
- #speed_threshold=(value = 50) ⇒ Object
Class Method Details
.connected ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rfbeam.rb', line 21 def self.connected path_str, dir = if RubySerial::ON_LINUX %w[ttyUSB /dev/] elsif RubySerial::ON_WINDOWS ['TODO: Implement find device for Windows', 'You lazy bugger'] else %w[tty.usbserial /dev/] end Dir.glob("#{dir}#{path_str}*") end |
Instance Method Details
#angle_threshold ⇒ Object
Angle Threshold, -90° to 90°, default = 0
134 135 136 |
# File 'lib/rfbeam/kld7/operation_params.rb', line 134 def angle_threshold query_parameter RADAR_PARAMETERS[:angle_threshold].grps_index end |
#angle_threshold=(value = 0) ⇒ Object Also known as: anth=, set_angle_threshold, spth=, set_speed_threshold
138 139 140 141 142 143 |
# File 'lib/rfbeam/kld7/operation_params.rb', line 138 def angle_threshold=(value = 0) raise ArgumentError, "Invalid arg: '#{value}'" unless (-90..90).cover?(value) raise ArgumentError, 'Expected an Integer' unless value.is_a?(Integer) set_parameter :anth, value, :int32 end |
#range_threshold ⇒ Object
Range Threshold, 0 - 100% of Range setting, default = 10
118 119 120 |
# File 'lib/rfbeam/kld7/operation_params.rb', line 118 def range_threshold query_parameter RADAR_PARAMETERS[:range_threshold].grps_index end |
#range_threshold=(value = 10) ⇒ Object Also known as: rath=, set_range_threshold
122 123 124 125 126 127 |
# File 'lib/rfbeam/kld7/operation_params.rb', line 122 def range_threshold=(value = 10) raise ArgumentError, "Invalid arg: '#{value}'" unless (0..100).cover?(value) raise ArgumentError, 'Expected an Integer' unless value.is_a?(Integer) set_parameter :rath, value, :uint32 end |
#speed_threshold ⇒ Object
Speed Threshold, 0 - 100% of speed setting, default = 50
150 151 152 |
# File 'lib/rfbeam/kld7/operation_params.rb', line 150 def speed_threshold query_parameter RADAR_PARAMETERS[:speed_threshold].grps_index end |
#speed_threshold=(value = 50) ⇒ Object
154 155 156 157 158 159 |
# File 'lib/rfbeam/kld7/operation_params.rb', line 154 def speed_threshold=(value = 50) raise ArgumentError, "Invalid arg: '#{value}'" unless (0..100).cover?(value) raise ArgumentError, 'Expected an Integer' unless value.is_a?(Integer) set_parameter :spth, value, :uint32 end |