73 Commits

Author SHA1 Message Date
Gordon Williams
e99bdd9541 Swap jsvGetStringLength()>0 to jsvIsEmptyString(line) - a lot faster 2025-05-23 15:25:09 +01:00
Gordon Williams
743af5ddd2 add deprecation docs 2024-12-03 15:33:06 +00:00
Gordon Williams
6773fed689 Remove setting of null termination after jsvGetString, since jsvGetString now does it automatically 2024-08-29 20:13:45 +01:00
Gordon Williams
a79e995ac1 fix typo - https://github.com/espruino/EspruinoTools/issues/175#issuecomment-2017605900 2024-03-25 10:49:35 +00:00
Gordon Williams
1341bceb21 Move commonly used sequences of function calls into functions (eg jsvRemoveChild,jsvUnLock -> jsvRemoveChildAndUnLock) - saves ~200b 2024-02-02 14:16:14 +00:00
Gordon Williams
744882346c Tidying up error messages - we've now saved 1.5k on Micrbit 1! 2023-10-06 11:47:37 +01:00
Gordon Williams
4327ebd34e Tidying up error messages (no trailing '.' or '\n'), making almost-similar error messages the same
Used the following to try and find issues:

find . -name "*.c" | xargs -I{} grep -h jsExceptionHere {} | sed -e "s/^[^\"]*\"/\"/" | sort | uniq -c
2023-10-06 10:47:58 +01:00
Gordon Williams
9b30f17227 Added jsvObjectGetChildIfExists to avoid the jsvObjectGetChild(... ,0) case - saves ~300b of flash space 2023-04-25 10:59:34 +01:00
qucchia
c5bb94bf7a Limit documentation comments to 80 characters (#2244) 2022-07-27 15:32:19 +02:00
Gordon Williams
f99ccaac3e fix espxx builds after new readJSON 2020-03-01 22:14:05 +00:00
Gordon Williams
e230148625 improve docs making 2019-11-07 16:12:27 +00:00
MaBecker
103b64c5c3 esp8266_fix1595_fix1640 2019-04-14 22:11:55 +02:00
Gordon Williams
5bc873ae38 fix memory leak reported in http://forum.espruino.com/conversations/323848 2018-08-02 09:07:34 +01:00
MaBecker
33fa7dcfbb add channelAP to .wificfg 2018-05-13 17:13:02 +02:00
MaBecker
1e55f843b2 fix wifi restore ssidAP 2018-05-13 07:45:43 +02:00
MaBecker
d1296381d3 return authmode as text 2018-05-11 11:20:17 +02:00
MaBecker
6eba176637 rearange rf_cal_sector (fix #1294)
* sector map for last 5 sectors of flash: ABCCC
   A : rf cal
   B : rf init data
   C : sdk parameters
* change last FlashArea
* update ESP8266_BOARD
2018-05-10 17:35:40 +02:00
Gordon Williams
1381fdcc3d
Merge pull request #1401 from MaBecker/wificonf
rewrite wifi.save and restore to use the storage lib (imp #1380)
2018-05-09 12:54:02 +01:00
MaBecker
a71ea63ce4 add option hidden to startAP (imp #1358)
* allow to find hidden access points
* option hidden tested on  ESPRUINO-WIFI board, option is ignored until
not implemented
2018-05-09 11:20:29 +02:00
MaBecker
7893b46a76 rewrite wifi.save and restore to use the storage lib (imp #1380)
* use .wificfg to store wifi credentials
* free wifi save page and add to save_code
* remove flash page 0x77000 and add to flash_available
* move wifi restore after JavaScript environment is up and running
2018-05-08 02:55:18 +02:00
Gordon Williams
eaef9c1440 Add better docs for the form of Wifi callback functions
Modify ESP8266/ESP32 callbacks to match the node.js style used elsewhere
2018-04-30 09:02:20 +01:00
Gordon Williams
9ffc516204 trying to bring WiFi docs/functions for Espruino in line on all platforms 2018-02-07 17:30:30 +00:00
MaBecker
87ec0578c0 add #else for WIFI and NET DBG 2018-01-13 09:09:26 +01:00
MaBecker
591c6a9c03 no debug if RELEASE
unset RELEASE
DEFINE=“—DNET_DBG=1 DNET_DBG=1 -DWIFI_DBG=1|2“ make
2018-01-09 21:26:11 +01:00
MaBecker
f92f753661 Revert "remove ifdef RELEASE block"
This reverts commit c486b93e88a5bf0fcdb47f5a713d0ae8fac63cee.
2018-01-09 21:07:14 +01:00
MaBecker
c486b93e88 remove ifdef RELEASE block
DEFINE=“-DNET_DBG=1 -DWIFI_DBG=1|2“ make

to switch NET and/or WIFI debug on
2018-01-08 23:52:03 +01:00
MaBecker
6e04cc7ff6 Revert "remove ifdef RELEASE block"
This reverts commit 96a4c68b851354ba91bee4c4c88de540051f8fe1.
2018-01-08 23:36:37 +01:00
MaBecker
96a4c68b85 remove ifdef RELEASE block
os_printf is only enable when WIFI_DBG is set

# normal debug
DEFINES="-DWIFI_DBG=1“ make

# verbose deduce
DEFINES="-DWIFI_DBG=2" make
2018-01-08 23:32:14 +01:00
MaBecker
3c4ea9d7b6 no callback if SSID is not available (fix #1297)
* add reason new in SDK 2.0
* extend callback check
2018-01-07 13:52:28 +01:00
MaBecker
5bf71e2dd4 fix issue #752 2018-01-05 00:22:50 +01:00
MaBecker
ae3a89f31a ESP8266: Remove osprintf for RELEASE 2017-09-15 10:40:17 +02:00
MaBecker
94031dbc65 ESP8266: move code save section to fist partition for memory mapping (fix #1240)
only fist partition is memory mapped
2017-09-14 21:54:29 +02:00
Standa Opichal
aa75f14ebb Disable startMDNS() in favor of mDNS.js
Without this the esp8266 uses the mdns port 5353 and silently ignores
any message to be received mDNS.js.
2017-08-25 23:49:43 +02:00
MaBecker
ffbc6bd8f4 fix issue #753 2017-07-21 14:46:11 +02:00
MaBecker
fdda1059c5 fix issue #1037
fix found by @iotong
2017-07-21 12:41:59 +02:00
Gordon Williams
c09739f663 Remove duplicate JSON code and WiFi functions in reference, fix #1155 2017-04-29 19:02:51 +01:00
MaBecker
7bc5093fca update ESP8266_4MB.py plus dependencies 2017-04-17 10:02:04 +02:00
MaBecker
ca820c353a update ESP8266_4MB 2017-04-16 21:22:59 +02:00
MaBecker
81204d6b15 use 0x200000 as save section and 0x300000 as flash section 2017-02-27 22:42:46 +01:00
MaBecker
6421b97f5e add save areas for FLASH_4MB_C1 2017-02-27 07:50:56 +01:00
Gordon Williams
7be1ecf6ed Merge pull request #1032 from MaBecker/patch-1
set WIFI_DBG 0  if def RELEASE
2017-01-26 11:14:14 +00:00
MaBecker
eabffa4032 add setIP and setAPIP 2017-01-24 14:19:46 +00:00
MaBecker
ee8463da9a set WIFI_DBG 0 if def RELEASE
do not include Wifi  debug statements when using RELEASE=1
2017-01-23 22:30:06 +01:00
Standa Opichal
28f5c403f7 Make sntpSync use setTime() not to break setInterval()
The setTime() properly sets the jsiLastIdleTime which is used
in the _jswrap_interface_setTimeoutOrInterval to trigger timers.

Update the time only when the mDNS returns non-null value.
2017-01-21 22:14:33 +01:00
Thorsten von Eicken
38c368422e update travis.yaml for esp8266; update readme_flash; fix #901 2016-09-16 23:33:15 -07:00
Thorsten von Eicken
c7cd61c59b fix ping on esp8266 2016-07-08 00:55:26 -07:00
Thorsten von Eicken
2c8c866f1b esp8266: exception code cleanup; jswsym code cleanup; eliminate compiler warnings 2016-04-17 09:46:32 -07:00
Thorsten von Eicken
4493b09eef fix esp8266 compiler warnings 2016-04-17 08:46:08 -07:00
Gordon Williams
5dd5d901d1 replace NewWithFlags with jsvNewXXX - saves a few bytes by killing repetition 2016-03-04 12:54:18 +00:00
Thorsten von Eicken
02ee106f97 tweaks after esp8266 improvements 2016-01-17 17:47:51 -08:00