Skip to content

Releases: Moddable-OpenSource/moddable

November 16, 2020

16 Nov 22:56
Compare
Choose a tag to compare
  • Crashes in the XS JavaScript engine fixed - #483, #484, and #485. This included a crash calling RegExp.prototype.toString with a proxy that returns numbers for source and flags. (reported by @kvenux)
  • Experimental metering feature in XS to allow a host to restrict the number of byte-codes executed. Not ready for general use.
  • Added low-level hook to Poco renderer to support custom drawing extensions.
  • Work underway to move all desktop simulators from the venerable screen test to mcsim to allow for more complete simulation. The new simulator is only used when the target platform begins with sim/. This work is still experimental and not ready for general use.
  • Turn Wi-Fi off at start-up on ESP8266 because some boards ship with flash preferences that enable it unexpectedly.
  • Improvements to the BLE mouse example - hit test order, mouse up handling, and rapid double clicks
  • BLE HID (Human Interface Device) module optimization to accelerate initial device connection.
  • BLE simplifications for remembering native objects (eliminates a build warning)
  • Piu sound example now includes M5Stack and M5Stack Core2 on the safe list (reported by @stc1988)
  • M5Stack now uses M5Button class for debouncing, like other M5 products. (from @stc1988)
  • serial2xsbug does a simple validation of the archive file to avoid installing corrupt mod. (based on report by @ariznaf)
  • mcrun on Windows now uses release tools like macOS and Linux
  • Fix deprecation warning for openFile in Piu PC on macOS Big Sur
  • Added support for 240x240 OLED displays using ST7789. (from @sveniv)
  • Support all four SPI modes in modSPI for ESP8266, ESP32, SiLabs Gecko, and Qualcomm QCA4020. (from @sveniv)
  • ILI9341 display driver supports configuring the SPI mode. (from @sveniv)
  • Add 240x240 display size to simulator (from @sveniv)

October 30, 2020

31 Oct 00:14
Compare
Choose a tag to compare

October 30, 2020

  • Instances of Digital now have a close method
  • In instances of TypedArray (Uint8Array, Float32Array, etc) an internal slot was visible to scripts. This was generally harmless but caused problems in certain circumstances. Fixes #479 and #480 (reported by @dckc)
  • Faster ESP32 builds on Windows by avoiding unnecessary time stamp change to sdkconfig.h
  • On Windows, detect invalid MODDABLE environment variable. Provides early error for #471 (reported by @thomasqbrady)
  • Fix for screen initialization on certain revisions M5Stack models (from @meganetaaan)
  • M5 device targets that support audio finish play the start-up sound before running the app. Fixes #482 (reported by @stc1988)
  • Add driver for BM8563 real time clock. Use in second generation M5 Stick C device target. (from @wilberforce)
  • AudioOut instances no longer are automatically garbage collected; they must be explicitly closed
  • NFNT font engine now uses the offset (from width offset table) when calculating horizontal position
  • New build targets in the simulator for Moddable One, Moddable Two, and Moddable Three. The devices support rotation.
> mcconfig -d -m -p sim/moddable_one
> mcconfig -d -m -p sim/moddable_two
> mcconfig -d -m -p sim/moddable_three
> mcconfig -d -m -p sim/moddable_three -r 90

Moddable Three Moddable Three rotated

October 20, 2020

20 Oct 21:42
Compare
Choose a tag to compare

This most significant change in this release is a fix to JSON parsing. The XS JavaScript engine has always been lenient in parsing for convenience, accepting trailing commas that are prohibited by the JSON specification. Here's an example, where the comma after "./main", ], and } are all disallowed in JSON (though allowed in JavaScript code):

{
	"include": "$(MODDABLE)/examples/manifest_base.json",
	"modules": {
		"*": [
			"./main",
		],
	},
}

With this release, XS fully conforms to the JSON specification, rejecting trailing commas. If your project manifests included trailing commas, you will now encounter parsing errors when building your project with mcconfig.

Note: This update to XS is backwards compatible with the byte-code from the October 14, 2020 release. Therefore, you do not have to rebuild the Moddable SDK tools, though it is recommended.

  • XS JavaScript engine fully conforms to JSON parsing requirements
  • All JSON files (about 300!) in the Moddable SDK have been updated to eliminate trailing commas #476 (reported by @erights)
  • mcconfig and mcrun now report manifest parsing errors with the file name and line number. Previously this only worked with debug builds of the tools.
  • Add $USERHOME environment variable to mcconfig which maps to $HOME on macOS and Linux, and $USERPROFILE on Windows. This is used to access some device specific build resources.
  • Fix build of servo module on Windows by using $USERPROFILE
  • Replace stray comma with semicolon in piu/bars example. Fixes #475 (reported by @stc1988)
  • Fix for display brightness control on all versions of M5Stick-C hardware #474 (from @wilberforce).
  • 16 color (4-bit palette color) displays work again in simulator and ESP8266. Works for the first time on ESP32. #477 (reported by @stc1988)
  • Added I2S to the Windows ESP8266 build to allow audio examples to build

October 14, 2020

14 Oct 22:34
Compare
Choose a tag to compare

This release is primarily an update to the XS JavaScript engine.

  • New optimization added to XS Linker to improve performance of property look-up for objects preloaded in flash/ROM. The performance gain is up to 18%, depending on a variety of factors. The optimization is based on graph coloring. See the ROM Colors document for details.
  • New XS byte code for for strings larger than 64 KB (found during work with @Agoric)
  • XS fix for "Object rest incorrectly accepts complex assignment targets" #155 (reported by @bakkot)
  • XS fix for "Eval preventing const declaration in the caller scope" #64 (reported by @tevador)
  • XS fix for "Object rest incorrectly accepts complex assignment targets" #155 (reported by @bakkot)
  • XS fix for "XS allows trailing comma in Expressions" #315 (reported by @jugglinmike)
  • XS fix for "async function: silent swallowing of the 'override mistake'" #322 (reported by @michaelfig) and "XS does not apply runtime strict mode restrictions to async functions" #334 (reported by @jugglinmike). These two reports are both symptoms of the same bug: an async function body ran in sloppy mode! Great find.

Note: The changes to the XS JavaScript engine are not backwards compatible with precompiled byte code. After updating, be sure to clear the contents of $MODDABLE/build/bin and $MODDABLE/build/tmp, and then rebuild tools. See Moddable SDK - Keeping Up To Date for details.

Note:: The xst binaries used by jsvu have been updated to this release of XS (10.4.0).

Other changes:

  • Project manifests for mods may now specify the rotation and pixel format, just like manifests for hosts
  • Correct time passed to Piu touch events (introduced in recent scheduling changes to Piu)

October 12, 2020

12 Oct 23:51
Compare
Choose a tag to compare

October 12, 2020

  • Timer class allows a timer to be unscheduled without being cleared as an optimization to avoid frequently allocating/deallocating a timer. To unschedule a timer, call Timer.schedule with only the id argument:
let t = Timer.repeat(() => trace("tick\n"), 1000);
t.schedule(t);
  • Piu unschedules internal idle timer when not needed by current UI content.
  • Fix ESP32 audio to play if first sound is queued after playback begins. This fixes Piu Sound playback failure reported by @meganetaaan
  • Backlight control is working on Moddable Two in all cases again
  • XS JavaScript engine partial fix for "Object rest incorrectly accepts complex assignment targets" #155 (reported by @bakkot)
  • Projects running on touch devices that do not use touch input can disable the touch driver entirely by setting touchCount to 0 in the config section of the manifest
  • Remove JavaScript module API interface to instrumentation from the base manifest. Most projects do not use it and removing it reduces the binary by several hundred bytes. Projects may still include the module directly. (The Instruments pane in xsbug is unchanged.)
  • Remove accents from Piu text example

October 6, 2020

06 Oct 21:38
Compare
Choose a tag to compare
  • mcrun uses correct path separator ("/", not "\") when building on Windows for ESP8266 and ESP32 targets (reported by @LongNguyen1984)
  • mDNS catches exceptions on UDP write to avoid reboot on unhandled exception when network disconnects
  • preferences on ESP32 doesn't orphan open NVS instance if invalid key passed

October 5, 2020

06 Oct 03:41
Compare
Choose a tag to compare

September 30, 2020

06 Oct 04:00
Compare
Choose a tag to compare
  • Add NodeMCU build device targets for ESP8266 and ESP32 (esp/nodemcu and esp32/nodemcu)
  • Add Button and LED classes following the TC53 IO Peripheral Class Pattern
  • Use Button and LED in classes in hosts for Moddable One, Moddable Two, Moddable Three, ESP8266 NodeMCU, and ESP32 NodeMCU.
new Host.Button.Default({
   onPush(down) {
      trace(`Button pushed: ${down}\n`);
   },
})
const led = new Host.LED.Default;
led.on();
led.off();
led.write(1);
  • Update Commodetto mini-drag example for FT6202 capacitive touch driver compatibility #465 (reported by @basuke)
  • mcrun fixes for Windows host
  • Piu example to control Moddable Two display backlight (by @lprader)
  • XS JavaScript engine fixes for #452 and #453 (reported by @kvenux)
  • ESP32 builds that do not use Wi-Fi are smaller (about 200 KB) by using esp_efuse_mac_get_default in the debugger communication to report the device ID
  • Option to set lwip hostname on ESP32 #470 (requested by @ederle)

September 25, 2020

06 Oct 05:34
Compare
Choose a tag to compare
  • IMA compressed audio now plays on 8-bit audio outputs
  • Piu idle uses interval to reduce frequency of idle events
  • GT911 capacitive touch input driver supports any number of touch points
  • wasm build fixes for Linux host
  • Fix crash on get("REMOTE_IP") on UDP sockets. Update documentation on remote IP. #457 (reported by @JanVanBraeckel)
  • Update WebSocket server document to correctly explain write method #445 (reported by @LaurenceMason)
  • Add replay example to demonstrate use of AudioIn class
  • XS JavaScript engine - disallow use of bound function as constructor, Object.defineProperties works for all types of functions
  • Add manifest for SMBus module
  • Content for examples that depend on non-secure http connection moved to test.moddable.com domain to avoid https redirect (reported by @basuke)
  • Core tween code of Piu Timeline object rewritten in C to increase speed and reduce memory use

This release includes significant enhancements to support for M5 device targets include M5Stack Fire, M5Stack CORE2, M5Atom Lite, M5Atom Echo, and M5Atom Matrix.

  • Support for M5Stack CORE2 build target (esp32/m5stack_core2) #455 (from @meganetaaan and @jpzukin)
  • Update targets for esp32/m5atom-matrix, esp32/m5atom-echo, and esp32/m5atom-liteto be consistent in
  • M5Atom target fixes - correct colors for NeoPixel lights, correct NeoPixel string length, consistent accelerometer orientation
  • Update AudioIn class to work on M5Stack Fire and M5Atom Echo targets.
  • M5Atom Echo example stops playing sound before starting next
  • Debounce buttons on M5 products to work around hardware noise when Wi-Fi is enabled

September 15, 2020

06 Oct 05:34
Compare
Choose a tag to compare
  • GT911 touch driver reuses read buffer to reduce load on garbage collector
  • Support 16-bit ARGB4444 pixels in tools
  • XS JavaScript engine fixes for #446, #447, #448, #449, and #450 (reported by @kvenux)
  • Fix crash if lwip socket closed immediately before Wi-Fi disconnect
  • Fix crash in when using lwip listener (reported by @basuke)
  • Fix crash invoking callbacks in audio mixer
  • Update Moddable One and Moddable Two documentation to describe pin use by I²C touch and SPI display components