mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
Fix 'this is only available in' docs
This commit is contained in:
parent
eaef9c1440
commit
24bfd5cede
@ -332,8 +332,8 @@ for jsondata in detail:
|
||||
desc.append("\n\n**Note:** This is only available in "+common.get_ifdef_description(jsondata["ifdef"]));
|
||||
if "ifndef" in jsondata:
|
||||
desc.append("\n\n**Note:** This is not available in "+common.get_ifdef_description(jsondata["ifndef"]));
|
||||
if "if" in jsondata:
|
||||
d = jsondata["if"].replace("||", " and ").replace("&&", " with ")
|
||||
if "#if" in jsondata:
|
||||
d = jsondata["#if"].replace("||", " and ").replace("&&", " with ")
|
||||
d = re.sub('defined\((.+?)\)', replace_with_ifdef_description, d)
|
||||
desc.append("\n\n**Note:** This is only available in "+d);
|
||||
html_description(desc, jsondata["name"])
|
||||
|
||||
@ -372,10 +372,11 @@ def get_ifdef_description(d):
|
||||
if d=="STM32": return "STM32 devices (including Espruino Original, Pico and WiFi)"
|
||||
if d=="STM32F1": return "STM32F1 devices (including Original Espruino Board)"
|
||||
if d=="NRF52": return "NRF52 devices (like Puck.js, Pixl.js and MDBT42Q)"
|
||||
if d=="PUCKJS": return "Puck.js devices"
|
||||
if d=="PIXLJS": return "Pixl.js boards"
|
||||
if d=="ESPRUINOWIFI": return "Espruino WiFi boards"
|
||||
if d=="ESP8266": return "ESP8266 devices running Espruino"
|
||||
if d=="ESP32": return "ESP32 devices"
|
||||
if d=="ESP8266": return "ESP8266 boards running Espruino"
|
||||
if d=="ESP32": return "ESP32 boards"
|
||||
if d=="EFM32": return "EFM32 devices"
|
||||
if d=="USE_LCD_SDL": return "Linux with SDL support compiled in"
|
||||
if d=="USE_TLS": return "devices with TLS and SSL support (Espruino Pico and Espruino WiFi only)"
|
||||
@ -391,6 +392,7 @@ def get_ifdef_description(d):
|
||||
if d=="USE_CRYPTO": return "devices that support Crypto Functionality (Espruino Pico, Original, Espruino WiFi, Espruino BLE devices, Linux or ESP8266)"
|
||||
if d=="USE_FLASHFS": return "devices with filesystem in Flash support enabled (ESP32 only)"
|
||||
if d=="USE_TERMINAL": return "devices with VT100 terminal emulation enabled (Pixl.js only)"
|
||||
if d=="USE_TELNET": return "devices with Telnet enabled (Linux, ESP8266 and ESP32)"
|
||||
print("WARNING: Unknown ifdef '"+d+"' in common.get_ifdef_description")
|
||||
return d
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user