mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
@@ -9,7 +9,7 @@ export const ACCESS_TOKEN = 'access_token';
|
||||
export const alovaInstance = createAlova({
|
||||
statesHook: ReactHook,
|
||||
// timeout: 3000, // 3 seconds before throwing a timeout error, default is 0 = none
|
||||
cacheFor: null, // disable cache
|
||||
// cacheFor: null, // disable cache
|
||||
// cacheFor: {
|
||||
// GET: {
|
||||
// mode: 'memory',
|
||||
|
||||
@@ -14,8 +14,10 @@ export const updateLogSettings = (data: LogSettings) =>
|
||||
export const fetchLogES = () => alovaInstance.Get('/es/log');
|
||||
|
||||
// Get versions from GitHub
|
||||
// cache for 10 minutes to stop getting the IP blocked by GitHub
|
||||
export const getStableVersion = () =>
|
||||
alovaInstanceGH.Get('latest', {
|
||||
cacheFor: 60 * 10 * 1000,
|
||||
transform(response: { data: { name: string; published_at: string } }) {
|
||||
return {
|
||||
name: response.data.name.substring(1),
|
||||
@@ -25,6 +27,7 @@ export const getStableVersion = () =>
|
||||
});
|
||||
export const getDevVersion = () =>
|
||||
alovaInstanceGH.Get('tags/latest', {
|
||||
cacheFor: 60 * 10 * 1000,
|
||||
transform(response: { data: { name: string; published_at: string } }) {
|
||||
return {
|
||||
name: response.data.name.split(/\s+/).splice(-1)[0].substring(1),
|
||||
|
||||
@@ -201,7 +201,7 @@ const SystemLog = () => {
|
||||
name="level"
|
||||
label={LL.LOG_LEVEL()}
|
||||
value={data.level}
|
||||
sx={{ width: '10ch' }}
|
||||
sx={{ width: '14ch' }}
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
|
||||
@@ -105,7 +105,7 @@ export default () => {
|
||||
let message = 'message #' + count;
|
||||
if (count % 6 === 1) {
|
||||
message +=
|
||||
' with a long message that will be wrapped, to see if it stays one a single line';
|
||||
' that is a long message that will be wrapped, to test if it gets truncated';
|
||||
}
|
||||
const data = {
|
||||
t: new Date().toISOString(),
|
||||
|
||||
@@ -127,7 +127,7 @@ board_build.filesystem = littlefs
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson @ 7.3.1
|
||||
ESP32Async/AsyncTCP @ 3.3.6
|
||||
ESP32Async/ESPAsyncWebServer @ 3.7.1
|
||||
ESP32Async/ESPAsyncWebServer @ 3.7.2
|
||||
https://github.com/emsesp/EMS-ESP-Modules.git @ 1.0.5
|
||||
|
||||
;
|
||||
|
||||
@@ -2115,7 +2115,7 @@ bool System::readCommand(const char * data) {
|
||||
strlcpy(value, p, 10); // get string
|
||||
device_id = (uint8_t)Helpers::hextoint(value); // convert hex to int
|
||||
if (!EMSESP::valid_device(device_id)) {
|
||||
LOG_ERROR("Invalid device ID (%d) in read command", device_id);
|
||||
LOG_ERROR("Invalid device ID (0x%02X) in read command", device_id);
|
||||
return false; // invalid device
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user