Small bug fix relating to interrupts afecting file transfer

tildatorch
Alistair MacDonald 2018-08-29 12:14:03 +01:00 committed by GitHub
parent 916a3b054c
commit e2c33faf79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -676,6 +676,7 @@ def btsppwrite(connection, data):
# Receive data from a Bluetooth serial connection
def btsppread(connection):
command()
global holdoffirq
# Don't let the interupt process the buffer mid command
holdoffirq = True
request = "AT+BTSPPGET=3," + str(connection) + "\n"
@ -778,6 +779,7 @@ def fscreate(filename):
# Read a chunk of data from a file on the flash storage
def fsreadpart(filename, size=256, start=0):
global holdoffirq
mode=int(start>0)
command()
# Don't let the interupt process the buffer mid command
@ -846,8 +848,8 @@ def callbuttonpressed_internal(nullparam=None):
def endbuttonpressed_internal(nullparam=None):
hangup()
# Startup...
# Startup...
# Start turning on the SIM800 asynchronously
onatstart = poweron(True)