flying_robot 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,3 +12,9 @@
12
12
 
13
13
  * 1 major enhancement:
14
14
  * Update parser for aileron command support
15
+
16
+ == 0.0.4 2009-11-17
17
+
18
+ * 2 minor enhancements:
19
+ * Refactor code for Maxsonar plugin
20
+ * Correct typo in aileron support
@@ -30,7 +30,7 @@ flying_robot takes a standard Ruby Arduino Development (RAD) project, and turns
30
30
 
31
31
  == INSTALL:
32
32
 
33
- * sudo gem install deadprogrammer-flying_robot
33
+ * sudo gem install flying_robot --source http://gemcutter.org/
34
34
 
35
35
  == LICENSE:
36
36
 
data/README.txt CHANGED
@@ -30,7 +30,7 @@ flying_robot takes a standard Ruby Arduino Development (RAD) project, and turns
30
30
 
31
31
  == INSTALL:
32
32
 
33
- * sudo gem install deadprogrammer-flying_robot
33
+ * sudo gem install flying_robot --source http://gemcutter.org/
34
34
 
35
35
  == LICENSE:
36
36
 
@@ -5,13 +5,13 @@
5
5
  class Maxsonar < ArduinoPlugin
6
6
  external_variables "unsigned long maxsonar_refresh_rate = 1000"
7
7
  external_variables "unsigned long maxsonar_last_reading_time = 0"
8
- external_variables "long last_maxsonar_distance = 0"
8
+ external_variables "int last_maxsonar_distance = 0"
9
9
  external_variables "int ping_rx"
10
10
  external_variables "bool maxsonar_init_complete"
11
11
 
12
12
  add_to_setup "maxsonar_init_complete = false;"
13
13
 
14
- long maxsonar_distance () {
14
+ int maxsonar_distance () {
15
15
  return last_maxsonar_distance ;
16
16
  }
17
17
 
@@ -26,16 +26,15 @@ class Maxsonar < ArduinoPlugin
26
26
 
27
27
  delay(250);
28
28
  digitalWrite(reset_pin, HIGH);
29
+ digitalWrite(reset_pin, LOW); // Activating MCU internal pull-down resistor
30
+ digitalWrite(reset_pin, HIGH);
29
31
  delay(100);
30
32
  last_maxsonar_distance = 0;
31
33
  maxsonar_init_complete = true ;
32
34
  }
33
35
 
34
36
  int read_maxsonar(int an_pin) {
35
- int dist = 0 ;
36
- dist = analogRead(an_pin);
37
- dist = (dist / 2);
38
- return dist;
37
+ return analogRead(an_pin) / 2 ;
39
38
  }
40
39
 
41
40
  void update_maxsonar(int an_pin, int reset_pin) {
@@ -51,7 +51,7 @@ class <%= base_name.camelize -%> < ArduinoSketch
51
51
  end
52
52
 
53
53
  def ailerons
54
- print_current_command("Ailerons", current_ailerons_deflection)
54
+ print_current_command("Ailerons", current_aileron_deflection)
55
55
  end
56
56
 
57
57
  def rudder
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "flying_robot"
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ron Evans"]
9
- s.date = %q{2009-11-15}
9
+ s.date = %q{2009-11-17}
10
10
  s.default_executable = %q{flying_robot}
11
11
  s.description = %q{flying_robot takes a standard Ruby Arduino Development (RAD) project, and turns it into a Unmanned Aerial Vehicle (UAV)}
12
12
  s.email = ["ron dot evans at gmail dot com"]
@@ -2,5 +2,5 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module FlyingRobot
5
- VERSION = '0.0.3'
5
+ VERSION = '0.0.4'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flying_robot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Evans
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-15 00:00:00 -08:00
12
+ date: 2009-11-17 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency