From 442718bf417eeae4a5ff92d96d83e3e6501ff6a1 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Tue, 17 Oct 2023 16:43:59 -0700 Subject: [PATCH] Fix digital storage calc --- Source/Meadow.Units/Conversions/DigitalStorageConversions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Meadow.Units/Conversions/DigitalStorageConversions.cs b/Source/Meadow.Units/Conversions/DigitalStorageConversions.cs index 1d41d67..82f6a73 100644 --- a/Source/Meadow.Units/Conversions/DigitalStorageConversions.cs +++ b/Source/Meadow.Units/Conversions/DigitalStorageConversions.cs @@ -10,7 +10,7 @@ public static double Convert(double value, DigitalStorage.UnitType from, Digital { return value; } - return value * digitalStorageConversions[(int)to] / digitalStorageConversions[(int)from]; + return value * digitalStorageConversions[(int)from] / digitalStorageConversions[(int)to]; } private static readonly double[] digitalStorageConversions =