def calibrateMirrorData(self, sender, signal, data):
    with self.dataLock:
        pressures = {}
        for row in self.mirrordata:
            if (row['type'] == 'pressure'):
                pressures[row['mac']] = int(row['lastvalue'].split('_')[0])
        if (len(pressures) == 2):
            macs = pressures.keys()
            offset = (pressures[macs[0]] - pressures[macs[1]])
            self.pressureOffsets = {}
            self.pressureOffsets[macs[0]] = (- offset)
            self.pressureOffsets[macs[1]] = 0
def calibrateMirrorData(self, sender, signal, data):
    with self.dataLock:
        pressures = {}
        for row in self.mirrordata:
            if (row['type'] == 'pressure'):
                pressures[row['mac']] = int(row['lastvalue'].split('_')[0])
        if (len(pressures) == 2):
            macs = pressures.keys()
            offset = (pressures[macs[0]] - pressures[macs[1]])
            self.pressureOffsets = {}
            self.pressureOffsets[macs[0]] = (- offset)
            self.pressureOffsets[macs[1]] = 0