Lightning Automotive

"Lightning is coming to your car!"

September 17, 2021

Lightning is coming to your car! After providing app developers with the ability to create smooth, good looking and easy to develop applications on the big screen TVs, we’re bringing Lightning, and much more, to the in-car touch screens!

Inherent top notch performance with Lightning’s WebGL rendering engine and unparalleled compatibility by leveraging browser technology. Develop your Lightning Car Application once and deploy it across all major brands that support a modern browser without recompiling, reintegrating and redesigning your application.

Touchscreen support

In order to support the Automotive devices Lightning needs support for a Touch interface. This is a bit different from the TV experience where Lightning originally started. Where as the TV is a purely a lean-back experience using a remote, the car primarily used with a touch screen. Whether the car is a lean forward or lean back experience depends, mostly lean forward as the user might be using the touch screen to get certain information or adjust settings. Think of getting directions, changing the radio station, checking the weather or adjusting the A/C vents. The usage pattern is slightly changing with the uprising of Electric Vehicles (EVs) where the media screens can potentially be used as a lean back experience while the car is charging. For example to catch up on some quick TV shows while the user waits. Two things remain constant between the TV and in car experience: users want a great looking smooth apps and app developers want an easy to use framework to develop in.

Automotive components

Lightning Automotive support comes with batteries included! Lightning comes with a set of prebuild components that typical car User Interfaces (UIs) would use. Similar with TV screens there is a high amount of reuse on certain design patterns. To help we’ve made a set of standard automotive components available and we’ll keep adding more if we see frequent design patterns appear. Components such as buttons, sliders, volume controls, vent controls and much more come, for free, with Lightning. This allows developers to reuse components that have already been built and are frequently used in automotive UIs.

Of course the standard automotive components can be extended, modified and changed according to the needs of the particular implementation. Feel free to contribute back if it would help the community or go off on your own Lightning Component adventure.

Performance

Lightning is originally created to achieve maximum performance on the lowest possible settop box (STB) hardware without doing compromises on the ease of development. This is especially important in the settop box (STB) cable industry, where the average lifecycle of a STB is around 5 years but could go up to 8 or 10 year old devices. The hardware used is often very low end - coming from traditional “zapper” STBs. These “zapper” STBs are low cost devices that are just good enough to do linear TV. This resulted into using old MIPS technologies with 3000 DMIPS on CPU processing power (which is very slow) still being used today. With the rise of apps being able to run modern high quality applications on the older hardware is a huge benefit. This prevents the need to refresh hardware and squeezing even more years out of existing hardware. However as applications became more complex this required an application framework that is “embedded smart”. Not designed for MacBook Pro’s with multi core CPUs and hefty GPU, though it will run just fine on that as well. Instead Lightning is designed to run on CPU constrained platforms, with a limited memory footprint and slow GPUs.

Now what about cars though? The SoCs being used in modern cars are very powerful, with multi-core CPUs and high powered GPUs. Simply put to add a $500 SoC on a $50.000 car doesn’t matter that much compared to STBs that have an average price point of $25. The performance benefit of Lightning on a brand new car certainly seems negligible at first. However the average lifecycle of a car is around 12 years (200.000 miles) and can go up to 20 years if maintained well. The introduction of EVs might even change that further as they are much less maintenance heavy. This is more than double of that of the STBs and as applications continue to get more complex so does their need for resources from the hardware they run on. What might not be a problem now will certainly become a problem down the road, the hardware of a 12 year old car is going to be vastly outdated from a brand new one. Selecting the right technology to write the applications is much more important for cars than any other platform out there. Simply because we tend to hold on to cars a lot longer than we do with other electronics such as TVs, game consoles, etc.

Of course there is a lot more then just performance. Because Lightning uses WebGL it provides a lot more features to create eye pleasing user interfaces. Effects such as blurs, gaussians, mirror reflections are suddenly all very easy to add. Without having a deep understanding of the underlying WebGL mechanics. Because the Lightning Applications are just webapps they run in the same browser as anything else, providing the same compatibility as you would expect from any other web application framework.

New Features

One of the biggest new features for Lightning Automotive is the introduction of Touch support. Since all cars today seem to come with a responsive touch screen (and no one likes a remote in the car) supporting touch is a prerequisite. Now “supporting touch” is a very simple term with a very complex technical meaning. Sure, tapping 1 object on the screen is “touch” but these days there are so many more gestures that users are used to. Such as swiping, pinching and double taps. In order for Lightning to provide the experience the user expects it needs support for multiple gestures and provide the application developers with “vectors” on how fast the user is performing a certain action and “maps” detailing where the user has interacted with the screen

Now it doesn’t end there, for those familiar with Lightning will recognize Lightning’s ability to provide a “focus path”. That focus path mechanism is available for Touch as well. In lay man’s terms each screen in Lightning is built up around “components”, sort of building blocks. Each item on the screen can be a component, a button, a piece of text. But also a collection of items on screen, such as a movie poster with a description, rating, actors and a preview / more info button can be seen as 1 component. For touch Lightning will provide a focus path per “finger” touching the screen based on which component the user ends up touching. As expected the touch events can bubble up through the focus path to determine which part of the code is going to handle it. Just like you are used to doing in Lightning today, just now you can have multiple components firing off events because the user goes from 1 remote control to using 2 or more fingers on the screen.

Lightning will come with a set of default touch gestures and provide a mechanism to extend the recognized gestures with a pluggable interface. The default gestures are:

  • Swipe up/down/left/right
  • Tap and double tap
  • Long press/hold

Get started

To get started with the Lightning Automotive kit go here: here on Github.
To see a touch demo you can go here. Or would you rather see the sourcecode?

Enjoy Lightning Automotive!