Skip to content

Commit

Permalink
fix: fix the format of all the files
Browse files Browse the repository at this point in the history
  • Loading branch information
Max851010 committed Feb 25, 2025
1 parent 942093e commit 769be41
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
5 changes: 1 addition & 4 deletions examples/C/src/SkiLift/lib/EntryGate.lf
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
* @author Cheng Yen, Tsai
*/
/** @author Cheng Yen, Tsai */
target C


reactor EntryGate {
input open: bool // Toggle mode

Expand Down
8 changes: 4 additions & 4 deletions examples/C/src/SkiLift/lib/EntrySensor.lf
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/**
* @author Cheng Yen, Tsai
*/
/** @author Cheng Yen, Tsai */
target C

preamble {=
#include <time.h>
#include <stdbool.h>
#include <stdlib.h>
=}

reactor EntrySensor {
preamble {=
int random_bool() {
Expand All @@ -24,7 +23,8 @@ reactor EntrySensor {
output gate_2: bool
output gate_3: bool

timer t(0, 200 msec);
timer t(0, 200 msec)

reaction(t) -> gate_1, gate_2, gate_3 {=
lf_set(gate_1, random_bool());
lf_set(gate_2, random_bool());
Expand Down
2 changes: 2 additions & 0 deletions examples/C/src/SkiLift/lib/LiftMotion.lf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
target C

import ScreenPrinter from "ScreenPrinter.lf"

reactor LiftMotion {
input move: bool // Toggle mode
input offset: int32_t
Expand Down
4 changes: 1 addition & 3 deletions examples/C/src/SkiLift/lib/LiftSensor.lf
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @author Cheng Yen, Tsai
*/
/** @author Cheng Yen, Tsai */
target C

reactor LiftSensor {
Expand Down
4 changes: 1 addition & 3 deletions examples/C/src/SkiLift/lib/ObjectDetector.lf
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @author Cheng Yen, Tsai
*/
/** @author Cheng Yen, Tsai */
target C

reactor ObjectDetector {
Expand Down
1 change: 1 addition & 0 deletions examples/C/src/SkiLift/lib/ScreenPrinter.lf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @author Cheng Yen, Tsai */
target C

preamble {=
#define WIDTH 80 // Width of the terminal screen
#define HEIGHT 6 // Number of rows for the ski lift
Expand Down

0 comments on commit 769be41

Please sign in to comment.