Wish Watchdog / Reset

janderkan

Well-Known Member
Licensed User
Longtime User
No, I would like to restart the device when I change the settings.
But I can close communication and init again.
Thank you for the reply.
 
Last edited:

Tayfur

Well-Known Member
Licensed User
Longtime User
You can restart the program by calling this Reset method:
B4X:
Sub Reset (tag As Byte)
   RunNative("SoftwareReset", Null)
End Sub
#if C
void SoftwareReset(B4R::Object* u) {
   asm volatile ( "jmp 0");
}
#end if

I read some error when I am compiling...

B4R version: 1.50
Parsing code. (0.01s)
Compiling code. (1.17s)
Building project (0.83s)
Compiling & deploying Ino project (WeMos D1 R2 & mini - COM3) Error

K:pROJEL~1GSMObjectsinsketch4r_main.cpp: Assembler messages:
K:pROJEL~1GSMObjectsinsketch4r_main.cpp:25: Error: unknown opcode or format name 'jmp'
K:pROJEL~1GSMObjectsinsketch4r_main.cpp:25: Error: unknown opcode or format name 'jmp'
exit status 1
Error compiling for board WeMos D1 R2 & mini.
 

Tayfur

Well-Known Member
Licensed User
Longtime User
I read some error when I am compiling...

B4R version: 1.50
Parsing code. (0.01s)
Compiling code. (1.17s)
Building project (0.83s)
Compiling & deploying Ino project (WeMos D1 R2 & mini - COM3) Error

K:pROJEL~1GSMObjectsinsketch4r_main.cpp: Assembler messages:
K:pROJEL~1GSMObjectsinsketch4r_main.cpp:25: Error: unknown opcode or format name 'jmp'
K:pROJEL~1GSMObjectsinsketch4r_main.cpp:25: Error: unknown opcode or format name 'jmp'
exit status 1
Error compiling for board WeMos D1 R2 & mini.


sorry I used WEMOS board.
I am lucky;
B4X:
Public Sub Reset
    dim ESP as ESP8266
    ESP.reset
end sub
 
Top