Skip to content

Commit

Permalink
bumped jshint version, fixed sample jshint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mseminatore committed Feb 5, 2019
1 parent 9c2dc66 commit c0efec7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"jsdoc-to-markdown": "^4.0.1",
"jshint": "^2.9.7",
"jshint": "^2.10.0",
"mocha": "^5.2.0",
"sepia": "^2.0.2"
}
Expand Down
9 changes: 5 additions & 4 deletions samples/geoloc.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ function sampleMain(tjs, options) {

console.log("Heading: " + compassDirs(drive_state.heading).green);

var lat = drive_state.latitude || 0;
var long = drive_state.longitude || 0;
console.log("GPS: " + lat.toString().green + ", " + long.toString().green);
var latitude = drive_state.latitude || 0;
var longitude = drive_state.longitude || 0;

console.log("GPS: " + latitude.toString().green + ", " + longitude.toString().green);

if (program.geocode) {
request({
method: 'GET',
url: "http://api.geonames.org/findNearestAddressJSON?lat=" + lat + "&lng=" + long + "&username=demo",
url: "http://api.geonames.org/findNearestAddressJSON?lat=" + latitude + "&lng=" + longitude + "&username=demo",
headers: { 'Content-Type': 'application/json; charset=utf-8' }
}, function (error, response, body) {
var res = JSON.parse(body).address;
Expand Down
6 changes: 3 additions & 3 deletions samples/homelink.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ sample.run();
function sampleMain(tjs, options) {
tjs.driveState(options, function (err, drive_state) {
if (drive_state) {
var lat = drive_state.latitude || 0;
var long = drive_state.longitude || 0;
var latitude = drive_state.latitude || 0;
var longitude = drive_state.longitude || 0;
var token = options.tokens[0];

tjs.homelink(options, lat, long, token, function (err, result) {
tjs.homelink(options, latitude, longitude, token, function (err, result) {
if (result.result) {
console.log("\nHomelink: " + "Door signaled!".bold.green);
} else {
Expand Down

0 comments on commit c0efec7

Please sign in to comment.