From 05cc70467d898ad05bf46e3846f296815c54b1d2 Mon Sep 17 00:00:00 2001 From: Mason Ticehurst Date: Fri, 9 Feb 2024 15:25:55 -0500 Subject: [PATCH] Move logo, keep use of in/out modifiers consistent --- eRINA_STM32F7/src/rina/demo.adb | 2 +- eRINA_STM32F7/src/rina/gui.adb | 14 +++++++++----- eRINA_STM32F7/src/rina/gui.ads | 5 +++-- eRINA_STM32F7/src/rina/textures.adb | 2 -- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/eRINA_STM32F7/src/rina/demo.adb b/eRINA_STM32F7/src/rina/demo.adb index b2a3376..d34f6a6 100644 --- a/eRINA_STM32F7/src/rina/demo.adb +++ b/eRINA_STM32F7/src/rina/demo.adb @@ -8,7 +8,7 @@ procedure Demo is begin GUI.Initialize ("eRINA Debug"); - Textures.Print (Textures.PSU.Bitmap, (0, 0)); + Textures.Print (Textures.PSU.Bitmap, (5, 10)); -- Keep board from immediately terminating loop Debug.Print (Debug.Info, "Message " & Counter'Image); diff --git a/eRINA_STM32F7/src/rina/gui.adb b/eRINA_STM32F7/src/rina/gui.adb index 4aa67de..d78bdde 100644 --- a/eRINA_STM32F7/src/rina/gui.adb +++ b/eRINA_STM32F7/src/rina/gui.adb @@ -14,17 +14,21 @@ package body GUI is end if; end Scale; - procedure Print (Msg : in String; Pos : HAL.Bitmap.Point) is + procedure Print (Msg : in String; Pos : in HAL.Bitmap.Point) is begin Bitmapped_Drawing.Draw_String (Buffer => STM32.Board.Display.Hidden_Buffer (1).all, - Start => Scale ((Pos.X, Pos.Y)), Msg => Msg, - Font => BMP_Fonts.Font8x8, Foreground => Foreground, + Start => Scale ((Pos.X, Pos.Y)), + Msg => Msg, + Font => BMP_Fonts.Font8x8, + Foreground => Foreground, Background => Background); + + STM32.Board.Display.Update_Layer (1, True); end Print; procedure Initialize (Title : in String) is - Title_Location : HAL.Bitmap.Point := (80, 5); + Title_Location : HAL.Bitmap.Point := (80, 10); begin STM32.RNG.Interrupts.Initialize_RNG; STM32.Board.Display.Initialize; @@ -33,7 +37,7 @@ package body GUI is end Initialize; function MeasureText - (Text : in String; Font : BMP_Fonts.BMP_Font) return Size + (Text : in String; Font : in BMP_Fonts.BMP_Font) return Size is begin return diff --git a/eRINA_STM32F7/src/rina/gui.ads b/eRINA_STM32F7/src/rina/gui.ads index 2f6b96d..3ecd31c 100644 --- a/eRINA_STM32F7/src/rina/gui.ads +++ b/eRINA_STM32F7/src/rina/gui.ads @@ -16,8 +16,9 @@ package GUI is Board_Resolution : Size := (480, 272); procedure Initialize (Title : in String); - procedure Print (Msg : in String; Pos : HAL.Bitmap.Point); + procedure Print (Msg : in String; Pos : in HAL.Bitmap.Point); + function MeasureText - (Text : in String; Font : BMP_Fonts.BMP_Font) return Size; + (Text : in String; Font : in BMP_Fonts.BMP_Font) return Size; function Scale (Point : in HAL.Bitmap.Point) return HAL.Bitmap.Point; end GUI; diff --git a/eRINA_STM32F7/src/rina/textures.adb b/eRINA_STM32F7/src/rina/textures.adb index b7582bb..7d35417 100644 --- a/eRINA_STM32F7/src/rina/textures.adb +++ b/eRINA_STM32F7/src/rina/textures.adb @@ -13,7 +13,5 @@ package body Textures is ((Pos.X + Row, Pos.Y + Column)); end loop; end loop; - - STM32.Board.Display.Update_Layer (1); end Print; end Textures;