if (E.CRC32(require('Storage').read('setting.json'))+require('Storage').hash(/\.boot\.js/)+E.CRC32(process.env.GIT_COMMIT)!=2686699053) { eval(require('Storage').read('bootupdate.js')); throw "Storage Updated!"}
E.setFlags({pretokenise:1});
var bleServices = {}, bleServiceOptions = { uart : true};
Bluetooth.setConsole(true);
Bangle.setLCDTimeout(10);
E.setTimeZone(0);E.on('errorFlag', function(errorFlags) {
  g.reset(1).setColor("#ff0000").setFont("6x8").setFontAlign(0,1).drawString(errorFlags,g.getWidth()/2,g.getHeight()-1).flip();
  print("Interpreter error:", errorFlags);
  E.getErrorFlags(); // clear flags so we get called next time
});
Bangle.setOptions({wakeOnBTN1:true,wakeOnBTN2:true,wakeOnBTN3:true,wakeOnFaceUp:false,wakeOnTouch:false,wakeOnTwist:false,twistThreshold:819.2,twistMaxY:-800,twistTimeout:1000});
NRF.setServices(bleServices, bleServiceOptions);delete bleServices,bleServiceOptions;
