Skip to content

Commit

Permalink
Definition of improvements to be made
Browse files Browse the repository at this point in the history
  • Loading branch information
Erick Simões committed Dec 29, 2016
1 parent 265bd74 commit 664088c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Ultrasonick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Released into the Creative Commons Attribution-ShareAlike 4.0 International.
*/

/**
* TODO: Consider removing compatibility for the old Arduino API
*/
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
Expand All @@ -28,6 +31,10 @@ int Ultrasonick::timing() {
return pulseIn(_echoPin, HIGH); // duration
}

/**
* TODO: Enable the change of sound velocity constants
* TODO: Change the variable type to a minnor size
*/
int Ultrasonick::distanceRead(int und) {
if (und)
return timing() / 28 / 2 ; //distance in CM
Expand Down
15 changes: 15 additions & 0 deletions Ultrasonick.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/**
* TODO: Change license to BSD-3-Clause
*/

/**
* TODO: Update layout of folders and files follows the new
* specification of libraries.
* https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification
*/

/*
Ultrasonick.h - Library for HC-SR04 Ultrasonic Ranging Module in a minimalist way.
Created by EricK Simoes (@AloErickSimoes), April 3, 2014.
Expand All @@ -16,6 +26,11 @@
#define CM 1
#define INC 0

/**
* TODO: Consider discontinuing use of classes and using structures
* TODO: Remove the underscore of the private variables name
* and use static keyword
*/
class Ultrasonick {
public:
Ultrasonick(int trigPin, int echoPin);
Expand Down

0 comments on commit 664088c

Please sign in to comment.