Skip to content

Commit

Permalink
Demo device is at a static position
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre ROTH committed Feb 22, 2016
1 parent e4eea6d commit b39a385
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/js/devices/nucleo_legrand/nucleo_lighting_device.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const DEFAULT_RTSP_IP_ADDRESS = '10.0.218.76';
const DEFAULT_RTSP_PORT = '8554';
const DEFAULT_RTSP_URI = '/lora';

const DEMO_EUI = '01-00-00-00-00-00-00-01';

export class NucleoLightingDevice extends NucleoDevice {

constructor(eui) {
Expand Down Expand Up @@ -44,6 +46,11 @@ export class NucleoLightingDevice extends NucleoDevice {
}

getPosition() {
return {latitude: 45.823302, longitude: 1.277762};
// Device with this EUI has a static position
if (this.getFormattedEUI() == DEMO_EUI) {
return {latitude: 45.823302, longitude: 1.277762};
} else {
return super.getPosition();
}
}
}

0 comments on commit b39a385

Please sign in to comment.