mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 19:26:37 +00:00
Berry add tasmota.urlbecload(url:string) -> bool
(#20412)
This commit is contained in:
parent
15b40801d4
commit
ea6b191378
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
||||
### Added
|
||||
- HASPmota type `chart` (#20372)
|
||||
- Berry add support for `tcpclientasync` in `tcpserver`
|
||||
- Berry add `tasmota.urlbecload(url:string) -> bool`
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "be_constobj.h"
|
||||
#include "be_ctypes.h"
|
||||
#include "be_mapping.h"
|
||||
#include "be_ctypes.h"
|
||||
|
||||
extern struct TasmotaGlobal_t TasmotaGlobal;
|
||||
extern struct TSettings * Settings;
|
||||
@ -69,6 +70,9 @@ extern int tasm_apply_str_op(bvm *vm);
|
||||
extern int32_t be_Tasmota_version(void);
|
||||
BE_FUNC_CTYPE_DECLARE(be_Tasmota_version, "i", "-");
|
||||
|
||||
extern bbool BerryBECLoader(const char * url);
|
||||
BE_FUNC_CTYPE_DECLARE(BerryBECLoader, "b", "s")
|
||||
|
||||
#include "solidify/solidified_tasmota_class.h"
|
||||
#include "solidify/solidified_rule_matcher.h"
|
||||
#include "solidify/solidified_trigger_class.h"
|
||||
@ -177,6 +181,7 @@ class be_class_tasmota (scope: global, name: Tasmota) {
|
||||
time_str, closure(Tasmota_time_str_closure)
|
||||
urlfetch, closure(Tasmota_urlfetch_closure)
|
||||
urlfetch_cmd, closure(Tasmota_urlfetch_cmd_closure)
|
||||
urlbecload, static_ctype_func(BerryBECLoader)
|
||||
|
||||
add_cron, closure(Tasmota_add_cron_closure)
|
||||
run_cron, closure(Tasmota_run_cron_closure)
|
||||
|
@ -778,6 +778,7 @@ void HandleBerryPartiionWizardLoaderButton(void) {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" bbool BerryBECLoader(const char * url);
|
||||
void HandleBerryPartitionWizardLoader(void) {
|
||||
if (BerryBECLoader(USE_BERRY_PARTITION_WIZARD_URL)) {
|
||||
// All good, redirect
|
||||
@ -792,7 +793,7 @@ void HandleBerryPartitionWizardLoader(void) {
|
||||
#endif //USE_BERRY_PARTITION_WIZARD
|
||||
|
||||
// return true if successful
|
||||
bool BerryBECLoader(const char * url) {
|
||||
extern "C" bbool BerryBECLoader(const char * url) {
|
||||
bvm *vm = berry.vm;
|
||||
|
||||
HTTPClientLight cl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user