Merge branch 'emsesp:dev' into dev

This commit is contained in:
Proddy
2025-01-25 07:31:09 +01:00
committed by GitHub
11 changed files with 114 additions and 90 deletions

View File

@@ -21,6 +21,7 @@ export interface Settings {
dallas_gpio: number;
dallas_parasite: boolean;
led_gpio: number;
led_type: number;
hide_led: boolean;
low_clock: boolean;
notoken_api: boolean;
@@ -262,6 +263,7 @@ export const BOARD_PROFILES: BoardProfiles = {
export interface BoardProfile {
board_profile: string;
led_gpio: number;
led_type: number;
dallas_gpio: number;
rx_gpio: number;
tx_gpio: number;

View File

@@ -550,6 +550,23 @@ const ApplicationSettings = () => {
margin="normal"
/>
</Grid>
{data.led_gpio !== 0 && (
<Grid>
<TextField
name="led_type"
label={'LED ' + LL.TYPE()}
value={data.led_type}
fullWidth
variant="outlined"
onChange={updateFormValue}
margin="normal"
select
>
<MenuItem value={0}>LED</MenuItem>
<MenuItem value={1}>RGB-LED</MenuItem>
</TextField>
</Grid>
)}
<Grid>
<TextField
name="phy_type"

View File

@@ -101,6 +101,7 @@ const SystemLog = () => {
const [readOpen, setReadOpen] = useState(false);
const [logEntries, setLogEntries] = useState<LogEntry[]>([]);
const [autoscroll, setAutoscroll] = useState(true);
const [lastId, setLastId] = useState<number>(-1);
const ALPHA_NUMERIC_DASH_REGEX = /^[a-fA-F0-9 ]+$/;
@@ -118,7 +119,10 @@ const SystemLog = () => {
.onMessage((message: { data: string }) => {
const rawData = message.data;
const logentry = JSON.parse(rawData) as LogEntry;
setLogEntries((log) => [...log, logentry]);
if (lastId < logentry.i) {
setLogEntries((log) => [...log, logentry]);
setLastId(logentry.i);
}
})
.onError(() => {
toast.error('No connection to Log service');

View File

@@ -343,10 +343,10 @@ const sk: Translation = {
DEVELOPER_MODE: 'Režim vývojára',
DUPLICATE: 'Duplicitné',
UPGRADE: 'Inovovať',
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.', // TODO translate
NO_DATA_1: 'No favourite EMS entities found. Use the', // TODO translate
NO_DATA_2: 'module to mark them.', // TODO translate
NO_DATA_3: 'To see all available entities go to' // TODO translate
DASHBOARD_1: 'Všetky entity EMS, ktoré sú aktívne a označené ako obľúbené, plus všetky vlastné entity, plány a údaje externých senzorov sú zobrazené nižšie.',
NO_DATA_1: 'Nenašli sa žiadne obľúbené entity EMS. Použite',
NO_DATA_2: 'modul na ich označenie.',
NO_DATA_3: 'Ak chcete zobraziť všetky dostupné entity, prejdite na'
};
export default sk;