Commit 2253f95a770057e0ff75b09eb75891c4fcace571
1 parent
4d61b71e54
Exists in
master
config.disable_delete_inbox_on_startup
Showing 2 changed files with 8 additions and 4 deletions Side-by-side Diff
config.sample.json
lib/modem.js
... | ... | @@ -224,14 +224,16 @@ function init() { |
224 | 224 | logger.info('Querying signal strength'); |
225 | 225 | await writeToPortAndWaitForOK('AT+CSQ\r'); |
226 | 226 | |
227 | - logger.info('Deleting existing messages'); | |
228 | - // await writeToPortAndWaitForOK('AT+CMGD=0,4\r'); | |
229 | - | |
230 | 227 | await readManufacturer(); |
231 | 228 | await readModel(); |
232 | 229 | await readIMEI(); |
233 | 230 | await readIMSI(); |
234 | 231 | |
232 | + if (!config.disable_delete_inbox_on_startup) { | |
233 | + logger.info('Deleting existing messages'); | |
234 | + await writeToPortAndWaitForOK('AT+CMGD=0,4\r'); | |
235 | + } | |
236 | + | |
235 | 237 | port.unpipe(parserWaitForOK); |
236 | 238 | |
237 | 239 | registerSignalStrengthBackgroundQuery(); |