Skip to content

Commit

Permalink
Move logo, keep use of in/out modifiers consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
masonticehurst committed Feb 9, 2024
1 parent 2fb0a30 commit 05cc704
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion eRINA_STM32F7/src/rina/demo.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 9 additions & 5 deletions eRINA_STM32F7/src/rina/gui.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions eRINA_STM32F7/src/rina/gui.ads
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 0 additions & 2 deletions eRINA_STM32F7/src/rina/textures.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 05cc704

Please sign in to comment.