Skip to content

Commit

Permalink
Use Ada 2022 @ syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
MyApaulogies committed Sep 28, 2024
1 parent e3f0275 commit 201ca87
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package body Component.Counter.Implementation is
Ignore_2 := Self.Dispatch_All;

-- Increment the count and perform the counter action:
Self.The_Count := Self.The_Count + 1;
Self.The_Count := @ + 1;
Counter_Action.Do_Action (Self.The_Count);

-- Send the count value out:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ package body Component.Counter.Implementation.Tester is
if not Self.Expect_Command_T_Send_Dropped then
pragma Assert (False, "The component's queue filled up when Command_T_Send was called!");
else
Self.Command_T_Send_Dropped_Count := Self.Command_T_Send_Dropped_Count + 1;
Self.Command_T_Send_Dropped_Count := @ + 1;
Self.Expect_Command_T_Send_Dropped := False;
end if;
end Command_T_Send_Dropped;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ package body Component.Oscillator.Implementation.Tester is
if not Self.Expect_Command_T_Send_Dropped then
pragma Assert (False, "The component's queue filled up when Command_T_Send was called!");
else
Self.Command_T_Send_Dropped_Count := Self.Command_T_Send_Dropped_Count + 1;
Self.Command_T_Send_Dropped_Count := @ + 1;
Self.Expect_Command_T_Send_Dropped := False;
end if;
end Command_T_Send_Dropped;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ package body Component.Parameter_Manager.Implementation.Tester is
if not Self.Expect_Command_T_Send_Dropped then
pragma Assert (False, "The component's queue filled up when Command_T_Send was called!");
else
Self.Command_T_Send_Dropped_Count := Self.Command_T_Send_Dropped_Count + 1;
Self.Command_T_Send_Dropped_Count := @ + 1;
Self.Expect_Command_T_Send_Dropped := False;
end if;
end Command_T_Send_Dropped;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ package body Parameter_Manager_Tests.Implementation is
while not Task_Exit.all and then Count < 2000 loop

-- Increment variables:
Count := Count + 1;
Count := @ + 1;

if Task_Send_Response then
-- Send a valid response:
Expand All @@ -115,7 +115,7 @@ package body Parameter_Manager_Tests.Implementation is
-- Send a valid response:
Sleep (4);
Class_Self.all.Tester.Timeout_Tick_Send (((0, 0), 0));
Tick_Count := Tick_Count + 1;
Tick_Count := @ + 1;
if Tick_Count > 4 then
Tick_Count := 0;
Task_Send_Timeout := False;
Expand Down
2 changes: 1 addition & 1 deletion src/last_chance_handler/linux/last_chance_handler.adb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package body Last_Chance_Handler is
GNAT.IO.Put ("LCH called => ");
while Peek (A) /= ASCII.NUL loop
GNAT.IO.Put (Peek (A));
A := A + 1;
A := @ + 1;
end loop;
GNAT.IO.Put (": ");
GNAT.IO.Put (Line); -- avoid the secondary stack for Line'Image
Expand Down
6 changes: 3 additions & 3 deletions src/last_chance_handler/pico/last_chance_handler.adb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ package body Last_Chance_Handler is
Packed_Exception_Data.Exception_Name (Copy_Idx) := Char_To_Byte (Char);

-- Don't overflow.
Copy_Idx := Copy_Idx + 1;
Copy_Idx := @ + 1;
if Copy_Idx > Packed_Exception_Data.Exception_Name'Last then
exit;
end if;
Expand All @@ -66,7 +66,7 @@ package body Last_Chance_Handler is
Packed_Exception_Data.Exception_Message (Copy_Idx) := Char_To_Byte (Char);

-- Don't overflow.
Copy_Idx := Copy_Idx + 1;
Copy_Idx := @ + 1;
if Copy_Idx > Packed_Exception_Data.Exception_Message'Last then
exit;
end if;
Expand Down Expand Up @@ -196,7 +196,7 @@ package body Last_Chance_Handler is
Pico_Uart.Send_Byte_Array (Component.Ccsds_Serial_Interface.Implementation.Sync_Pattern & Pkt_Bytes);

-- Increment sequence count:
Cnt := Cnt + 1;
Cnt := @ + 1;
end loop;
end;
end;
Expand Down
2 changes: 1 addition & 1 deletion src/pico_util/hello_pico/hello_pico.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ project Hello_Pico is
for Main use ("main.adb");

package Compiler is
for Default_Switches ("Ada") use Adamant_Example_Config.Ada_Compiler_Switches;
for Default_Switches ("Ada") use Adamant_Example_Config.Ada_Compiler_Switches & ("-gnat2022");
end Compiler;

package Binder is
Expand Down
2 changes: 1 addition & 1 deletion src/pico_util/hello_pico/main.adb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ begin
--delay 0.2;

-- Next release time
Release := Release + Period;
Release := @ + Period;
Send_Hello;
-- RP.Device.Timer.Delay_Milliseconds (250);
end loop;
Expand Down

0 comments on commit 201ca87

Please sign in to comment.