2018-11-26 12:58:15 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the "bluetoothheater" distribution
|
|
|
|
* (https://gitlab.com/mrjones.id.au/bluetoothheater)
|
|
|
|
*
|
2019-09-08 02:14:36 +02:00
|
|
|
* Copyright (C) 2019 Ray Jones <ray@mrjones.id.au>
|
2018-11-26 12:58:15 +01:00
|
|
|
* Copyright (C) 2018 James Clark
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-05-20 14:09:59 +02:00
|
|
|
#ifndef __BTC_HELPERS_H__
|
|
|
|
#define __BTC_HELPERS_H__
|
|
|
|
|
2019-06-16 01:09:29 +02:00
|
|
|
#include "UtilClasses.h"
|
2020-04-11 10:49:52 +02:00
|
|
|
#include "DemandManager.h"
|
2018-12-08 13:25:53 +01:00
|
|
|
|
2019-10-18 03:55:16 +02:00
|
|
|
class CTempSense;
|
2019-06-04 22:15:12 +02:00
|
|
|
struct sGPIO;
|
|
|
|
|
2019-06-29 10:08:37 +02:00
|
|
|
extern void forceBootInit();
|
2018-12-01 01:36:25 +01:00
|
|
|
|
2020-04-11 10:49:52 +02:00
|
|
|
extern CDemandManager::eStartCode requestOn();
|
2018-12-15 10:34:58 +01:00
|
|
|
extern void requestOff();
|
|
|
|
extern void reqPumpPrime(bool on);
|
2019-06-29 10:08:37 +02:00
|
|
|
|
2019-10-18 03:55:16 +02:00
|
|
|
extern float getTemperatureSensor(int source = 0);
|
2018-12-15 10:34:58 +01:00
|
|
|
extern void setDateTime(const char* newTime);
|
|
|
|
extern void setDate(const char* newTime);
|
|
|
|
extern void setTime(const char* newTime);
|
2019-04-19 13:38:39 +02:00
|
|
|
extern void interpretJsonCommand(char* pLine);
|
|
|
|
extern void resetWebModerator();
|
2019-09-04 12:59:01 +02:00
|
|
|
extern void resetFuelGauge();
|
2018-12-20 23:22:29 +01:00
|
|
|
extern const char* getBlueWireStatStr();
|
2019-04-19 13:38:39 +02:00
|
|
|
extern bool hasOEMcontroller();
|
|
|
|
extern bool hasOEMLCDcontroller();
|
2020-04-25 01:23:16 +02:00
|
|
|
extern bool hasHtrData();
|
2019-04-19 13:38:39 +02:00
|
|
|
extern int getBlueWireStat();
|
|
|
|
extern int getSmartError();
|
2020-05-13 02:37:31 +02:00
|
|
|
extern bool isCyclicStopStartActive();
|
2019-04-19 13:38:39 +02:00
|
|
|
extern float getVersion();
|
2020-01-04 08:13:40 +01:00
|
|
|
const char* getVersionStr(bool beta=false);
|
2019-04-19 13:38:39 +02:00
|
|
|
extern const char* getVersionDate();
|
|
|
|
extern int getBoardRevision();
|
|
|
|
extern void setupGPIO();
|
2019-08-01 14:57:18 +02:00
|
|
|
extern bool setGPIOout(int channel, bool state);
|
2019-06-02 14:47:35 +02:00
|
|
|
extern bool getGPIOout(int channel);
|
|
|
|
extern bool toggleGPIOout(int channel);
|
2019-05-18 10:49:22 +02:00
|
|
|
extern void feedWatchdog();
|
2019-08-03 04:42:49 +02:00
|
|
|
extern int isUpdateAvailable(bool test=true);
|
2019-05-20 14:09:59 +02:00
|
|
|
extern void checkFOTA();
|
2019-06-02 14:47:35 +02:00
|
|
|
extern void setUploadSize(long val);
|
2019-06-04 22:15:12 +02:00
|
|
|
extern void getGPIOinfo(sGPIO& info);
|
|
|
|
extern void simulateGPIOin(uint8_t newKey);
|
2019-07-21 13:17:54 +02:00
|
|
|
extern float getBatteryVoltage(bool fast);
|
2019-07-06 15:46:20 +02:00
|
|
|
extern float getGlowVolts();
|
|
|
|
extern float getGlowCurrent();
|
2019-09-21 01:58:51 +02:00
|
|
|
extern int getFanSpeed();
|
2019-07-15 11:56:36 +02:00
|
|
|
extern int sysUptime();
|
2019-09-01 09:35:12 +02:00
|
|
|
extern void doJSONwatchdog(int topup);
|
2019-09-17 00:30:49 +02:00
|
|
|
extern void reloadScreens();
|
2019-10-18 03:55:16 +02:00
|
|
|
extern CTempSense& getTempSensor() ;
|
2020-03-23 06:54:15 +01:00
|
|
|
extern void reqHeaterCalUpdate();
|
2019-09-17 00:30:49 +02:00
|
|
|
|
2019-05-20 14:09:59 +02:00
|
|
|
|
2020-04-25 01:23:16 +02:00
|
|
|
void setName(const char* name, int type);
|
|
|
|
void setPassword(const char* name, int type);
|
2019-04-04 12:48:05 +02:00
|
|
|
|
2019-06-02 22:34:45 +02:00
|
|
|
extern void ShowOTAScreen(int percent=0, eOTAmodes updateType=eOTAnormal);
|
|
|
|
|
2019-09-20 15:00:27 +02:00
|
|
|
extern void updateMQTT();
|
|
|
|
extern void refreshMQTT();
|
2020-03-23 06:54:15 +01:00
|
|
|
extern void requestMQTTrestart();
|
2019-06-02 22:34:45 +02:00
|
|
|
|
2019-05-20 14:09:59 +02:00
|
|
|
#endif
|