js subghz module fixes and improvements

by @Willy-JL
This commit is contained in:
MX
2024-07-08 07:51:20 +03:00
parent e4f315188b
commit 3b74c0733f
2 changed files with 233 additions and 83 deletions

View File

@@ -29,9 +29,17 @@ changeFrequency(433920000);
printRXline();
delay(1000);
let result = subghz.transmitFile("/ext/subghz/0.sub");
print(result ? "Send success" : "Send failed");
print("Sending 0.sub")
subghz.transmitFile("/ext/subghz/0.sub");
// Can also specify repeat count: subghz.transmitFile(path, repeat)
// If not provided, defaults to 1 repeat for RAW and 10 repeats for parsed
// These 10 repeats by default are to simulate holding the button on remote
print("Send success");
delay(1000);
changeFrequency(315000000);
printRXline();
printRXline();
// Optional, done automatically at script end
subghz.end()
// But can be used to setup again, which will retry to detect external modules