Skip to content

Commit

Permalink
Update GUI to refresh on Frame_Rate frequency, show ignored packets o…
Browse files Browse the repository at this point in the history
…n gui
  • Loading branch information
masonticehurst committed Feb 14, 2024
1 parent 5c863c6 commit 4ee4f5c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 50 deletions.
5 changes: 0 additions & 5 deletions eRINA_STM32F7/src/net/network.adb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ package body Network is
Receiver.Start;
end Initialize;

function Get_ARP_Request_Count return Natural is
begin
return Receiver.ARP_Request_Count;
end Get_ARP_Request_Count;

end Network;
1 change: 0 additions & 1 deletion eRINA_STM32F7/src/net/network.ads
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ package Network is
Ifnet : aliased Net.Interfaces.STM32.STM32_Ifnet;

procedure Initialize;
function Get_ARP_Request_Count return Natural;
end Network;
14 changes: 7 additions & 7 deletions eRINA_STM32F7/src/rina/demo.adb
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
with GUI;
with Debug;
with Textures;
with Textures.PSU;
with Network;
with STM32;
with STM32.Board;

procedure Demo is
Counter : Natural := 0;
begin

GUI.Initialize;
Network.Initialize;
STM32.Board.Configure_User_Button_GPIO;
STM32.Board.Initialize_LEDs;
STM32.Board.All_LEDs_Off;

-- Keep board from immediately terminating
loop
Expand All @@ -18,11 +20,9 @@ begin
GUI.Print ("eRINA Debug", (80, 15));

GUI.Print
("ARP Request Count: " & Network.Get_ARP_Request_Count'Image,
("Ignored Packets: " & Network.Ifnet.Rx_Stats.Ignored'Image,
(80, 30));

Debug.Print (Debug.Warning, "Blah " & Counter'Image);
Counter := Counter + 1;
delay 0.2;
delay Duration(1 / GUI.Frame_Rate);
end loop;
end Demo;
3 changes: 2 additions & 1 deletion eRINA_STM32F7/src/rina/gui.ads
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ package GUI is
end record;

Board_Resolution : Size := (480, 272);

Frame_Rate : Natural := 60;

procedure Initialize;
procedure Update;
procedure Print (Msg : in String; Pos : in HAL.Bitmap.Point);
Expand Down
36 changes: 0 additions & 36 deletions eRINA_STM32F7/src/rina/test.adb

This file was deleted.

0 comments on commit 4ee4f5c

Please sign in to comment.