Example #1
0
def load_skipDays():
    return int(FILES.loadline(FILENAME_SCHEDULE, ROW_SKIP_DAYS))
Example #2
0
def save_percentage(percentage):
    FILES.saveline(FILENAME_NOW, ROW_PERCENTAGE, str(percentage))
Example #3
0
def saveEvent(type, ml, date):
    data = FILES.load(FILENAME)
    record = type + "|" + TIMES.stringFrom(date) + "|" + str(ml) + "\n"
    data.append(record)
    FILES.save(FILENAME, data)
Example #4
0
def load_volume():
    return int(FILES.loadline(FILENAME_NOW, ROW_VOLUME))
Example #5
0
def save_pouringInProgress(pouringInProgress):
    FILES.saveline(FILENAME_NOW, ROW_POURING_IN_PROGRESS,
                   str(pouringInProgress))
Example #6
0
def load_distanceEmpty():
    return float(FILES.loadline(FILENAME_CUBE, ROW_DISTANCE_EMPTY))
Example #7
0
def load_distance():
    return float(FILES.loadline(FILENAME_NOW, ROW_DISTANCE))
Example #8
0
def load_token():
    return FILES.loadline(FILENAME_NOTIFICATION, ROW_TOKEN).rstrip()
Example #9
0
def load_shouldSend():
    return int(FILES.loadline(FILENAME_NOTIFICATION, ROW_SHOULD_SEND).rstrip())
Example #10
0
def save_ml(ml):
    FILES.saveline(FILENAME_SCHEDULE, ROW_ML, str(ml))
Example #11
0
def save_skipDays(skipDays):
    FILES.saveline(FILENAME_SCHEDULE, ROW_SKIP_DAYS, str(skipDays))
Example #12
0
def save_date(date):
    FILES.saveline(FILENAME_SCHEDULE, ROW_DATE, date)
Example #13
0
def save_name(name):
    FILES.saveline(FILENAME_SCHEDULE, ROW_NAME, name.rstrip())
Example #14
0
def save_enabled(enabled):
    FILES.saveline(FILENAME_SCHEDULE, ROW_ENABLED, str(enabled))
Example #15
0
def load_volumeMax():
    return int(FILES.loadline(FILENAME_CUBE, ROW_VOLUME_MAX))
Example #16
0
def load_sending():
    return int(FILES.loadline(FILENAME_NOTIFICATION, ROW_SENDING).rstrip())
Example #17
0
def load_distanceFull():
    return float(FILES.loadline(FILENAME_CUBE, ROW_DISTANCE_FULL))
Example #18
0
def save_token(token):
    # print("DATA - SAVE TOKEN = ")
    # print(token)
    FILES.saveline(FILENAME_NOTIFICATION, ROW_TOKEN, token.rstrip())
Example #19
0
def load_pouringInProgress():
    return int(FILES.loadline(FILENAME_NOW, ROW_POURING_IN_PROGRESS))
Example #20
0
def save_shouldSend(shouldSend):
    FILES.saveline(FILENAME_NOTIFICATION, ROW_SHOULD_SEND,
                   str(shouldSend).rstrip())
Example #21
0
def load_percentage():
    return float(FILES.loadline(FILENAME_NOW, ROW_PERCENTAGE))
Example #22
0
def save_sending(sending):
    FILES.saveline(FILENAME_NOTIFICATION, ROW_SENDING, str(sending).rstrip())
Example #23
0
def load_daysLeft():
    return int(FILES.loadline(FILENAME_NOW, ROW_DAYS_LEFT))
Example #24
0
def load_waitForInternetConnection():
    return int(FILES.loadline(FILENAME_CUBE, ROW_WAIT_FOR_INTERNET_CONNECTION))
Example #25
0
def save_distance(distance):
    FILES.saveline(FILENAME_NOW, ROW_DISTANCE, str(distance))
Example #26
0
def load_warningPercentage():
    return float(FILES.loadline(FILENAME_CUBE, ROW_WARNING_PERCENTAGE))
Example #27
0
def load_allEvents():
    print("HISTORY - LOAD: ALL EVENTS")
    return FILES.load(FILENAME)
Example #28
0
def load_warningDaysLeft():
    return int(FILES.loadline(FILENAME_CUBE, ROW_WARNING_DAYS_LEFT))
Example #29
0
def reset():
    data = 'HISTORY\n'
    FILES.save(FILENAME, data)
Example #30
0
def load_ml():
    return int(FILES.loadline(FILENAME_SCHEDULE, ROW_ML))