feat(rfid): more rfid topics while monitoring the system run
This commit is contained in:
@@ -8,7 +8,22 @@ export const noRead = async (reader: string) => {
|
||||
createLog(
|
||||
"error",
|
||||
"rfid",
|
||||
"rifd",
|
||||
"rfid",
|
||||
`${reader} just had a no read please check for a tag and manually trigger a read.`
|
||||
);
|
||||
};
|
||||
|
||||
// noReadTimer.js
|
||||
let timeout: any = null;
|
||||
|
||||
export const startNoReadTimer = (onTimeout: any, ms = 10000) => {
|
||||
clearNoReadTimer(); // Always clear any previous timer
|
||||
timeout = setTimeout(onTimeout, ms);
|
||||
};
|
||||
|
||||
export const clearNoReadTimer = () => {
|
||||
if (timeout) {
|
||||
clearTimeout(timeout);
|
||||
timeout = null;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user