mainDeque = binBuffer.flushBuffer() #Buffer queue should be empty #print "Sending signal to Display " #Update global count values #print binBuffer.getCount("black") globalVars.blackCount = 0 #print binBuffer.getCount("green") globalVars.greenCount = 2 #print binBuffer.getCount("blue") globalVars.blueCount = 4 #print binBuffer.getCount("grey") globalVars.greyCount = 6 #print "Sending signal to SD to save " sdFile.quickAppendBuffer(mainDeque) #inserts the buffer to database, and the count values to update the display print "calling update database" db.updateDatabase(mainDeque, globalVars.blackCount, globalVars.greenCount, globalVars.blueCount, globalVars.greyCount) #date = time.strftime("%d_%m_%Y") #get current date #filePath = relativePath + date + "_" + location + "_" + color + ".csv" #print "quickRead: " + str(sdFile.quickRead(filePath)) #Test buffer #test = raw_input ("Enter stuff in deque: ") #color = raw_input ("Enter color: ") #binBuffer.simulateQueue(test,color) sleep(3) globalVars.blackCount += 1 binBuffer.setEmptyFlag(false) '