Commit a8340480ba82fc9f0b48a675ae9e48b7ebbd4117

Authored by Adhidarma Hadiwinoto
1 parent 33dd879a54
Exists in master

registerModemToCenterPeriodically

Showing 1 changed file with 9 additions and 1 deletions Side-by-side Diff

... ... @@ -262,6 +262,14 @@ async function querySignalStrength() {
262 262 }
263 263 }
264 264  
  265 +function registerModemToCenterPeriodically() {
  266 + registerModem(modemInfo);
  267 +
  268 + setInterval(() => {
  269 + registerModem(modemInfo);
  270 + }, 60 * 1000);
  271 +}
  272 +
265 273 async function registerSignalStrengthBackgroundQuery() {
266 274 logger.info('Registering background signal strength query');
267 275  
... ... @@ -345,7 +353,7 @@ function init() {
345 353 mutex.releaseLockWaitForCommand();
346 354 logger.verbose('Init completed');
347 355  
348   - registerModem(modemInfo);
  356 + registerModemToCenterPeriodically();
349 357 registerSignalStrengthBackgroundQuery();
350 358 });
351 359 }