mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 13:16:32 +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
|
### Added
|
||||||
- HASPmota type `chart` (#20372)
|
- HASPmota type `chart` (#20372)
|
||||||
- Berry add support for `tcpclientasync` in `tcpserver`
|
- Berry add support for `tcpclientasync` in `tcpserver`
|
||||||
|
- Berry add `tasmota.urlbecload(url:string) -> bool`
|
||||||
|
|
||||||
### Breaking Changed
|
### Breaking Changed
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "be_constobj.h"
|
#include "be_constobj.h"
|
||||||
#include "be_ctypes.h"
|
#include "be_ctypes.h"
|
||||||
#include "be_mapping.h"
|
#include "be_mapping.h"
|
||||||
|
#include "be_ctypes.h"
|
||||||
|
|
||||||
extern struct TasmotaGlobal_t TasmotaGlobal;
|
extern struct TasmotaGlobal_t TasmotaGlobal;
|
||||||
extern struct TSettings * Settings;
|
extern struct TSettings * Settings;
|
||||||
@ -69,6 +70,9 @@ extern int tasm_apply_str_op(bvm *vm);
|
|||||||
extern int32_t be_Tasmota_version(void);
|
extern int32_t be_Tasmota_version(void);
|
||||||
BE_FUNC_CTYPE_DECLARE(be_Tasmota_version, "i", "-");
|
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_tasmota_class.h"
|
||||||
#include "solidify/solidified_rule_matcher.h"
|
#include "solidify/solidified_rule_matcher.h"
|
||||||
#include "solidify/solidified_trigger_class.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)
|
time_str, closure(Tasmota_time_str_closure)
|
||||||
urlfetch, closure(Tasmota_urlfetch_closure)
|
urlfetch, closure(Tasmota_urlfetch_closure)
|
||||||
urlfetch_cmd, closure(Tasmota_urlfetch_cmd_closure)
|
urlfetch_cmd, closure(Tasmota_urlfetch_cmd_closure)
|
||||||
|
urlbecload, static_ctype_func(BerryBECLoader)
|
||||||
|
|
||||||
add_cron, closure(Tasmota_add_cron_closure)
|
add_cron, closure(Tasmota_add_cron_closure)
|
||||||
run_cron, closure(Tasmota_run_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) {
|
void HandleBerryPartitionWizardLoader(void) {
|
||||||
if (BerryBECLoader(USE_BERRY_PARTITION_WIZARD_URL)) {
|
if (BerryBECLoader(USE_BERRY_PARTITION_WIZARD_URL)) {
|
||||||
// All good, redirect
|
// All good, redirect
|
||||||
@ -792,7 +793,7 @@ void HandleBerryPartitionWizardLoader(void) {
|
|||||||
#endif //USE_BERRY_PARTITION_WIZARD
|
#endif //USE_BERRY_PARTITION_WIZARD
|
||||||
|
|
||||||
// return true if successful
|
// return true if successful
|
||||||
bool BerryBECLoader(const char * url) {
|
extern "C" bbool BerryBECLoader(const char * url) {
|
||||||
bvm *vm = berry.vm;
|
bvm *vm = berry.vm;
|
||||||
|
|
||||||
HTTPClientLight cl;
|
HTTPClientLight cl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user