From 7e6a5c5bbcf9d112a1a413ad5bfec39b3c6f0d73 Mon Sep 17 00:00:00 2001 From: Andy Liu Date: Sat, 27 Apr 2024 20:07:41 +0800 Subject: [PATCH] Update ThermalImage to fit API change Signed-off-by: Andy Liu --- Examples/AMG88xx/ThermalImage/Sources/ThermalImage/main.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Examples/AMG88xx/ThermalImage/Sources/ThermalImage/main.swift b/Examples/AMG88xx/ThermalImage/Sources/ThermalImage/main.swift index ba394ef..5f76c96 100644 --- a/Examples/AMG88xx/ThermalImage/Sources/ThermalImage/main.swift +++ b/Examples/AMG88xx/ThermalImage/Sources/ThermalImage/main.swift @@ -126,7 +126,9 @@ while true { // Pass all pixel info to the screen using SPI communication to display the // generated thermal image. - screen.writeScreen(data) + data.withUnsafeBytes { ptr in + screen.writeScreen(ptr) + } } // The original pixels from the sensor is 8x8. By comparison, the screen is