QoL

Overview

QoL is a utility class that, as its name suggests, provides quality-of-life improvements.


Usage

Set Bulk Caching Mode

Set the bulk caching mode for all Lynx modules in a given HardwareMap. Bulk caching can improve performance by reducing the number of hardware reads.

// Automatic bulk reads
QoL.setBulkCachingMode(hardwareMap, LynxModule.BulkCachingMode.AUTO);

// Manual bulk reads
QoL.setBulkCachingMode(hardwareMap, LynxModule.BulkCachingMode.MANUAL);

Tip: If you're unfamiliar with bulk reads, refer to the GM0 Bulk Reads explanation for details.

Clear Bulk Cache

Clears the bulk data cache for all Lynx modules. In MANUAL bulk caching mode, clearing the cache is necessary so that subsequent sensor readings are up-to-date and not using stale data.

QoL.clearBulkCache(hardwareMap);

Tip: Clearing the cache is unnecessary in AUTO mode, as it automatically updates data each cycle. For more information, see the GM0 Bulk Reads explanation.

Last updated