Fixed bad example code.
This commit is contained in:
@@ -1,28 +1,22 @@
|
||||
program sncExample
|
||||
double v;
|
||||
assign v to "{user}:xxxExample";
|
||||
assign v to "{user}:aiExample";
|
||||
monitor v;
|
||||
|
||||
ss ss1
|
||||
{
|
||||
state low
|
||||
{
|
||||
when(v>5.0)
|
||||
{
|
||||
printf("changing to high\n");
|
||||
} state high
|
||||
when(delay(.1))
|
||||
{
|
||||
} state low
|
||||
}
|
||||
state high
|
||||
{
|
||||
when(v<=5.0)
|
||||
{
|
||||
printf("changing to low\n");
|
||||
} state low
|
||||
when(delay(.1))
|
||||
{
|
||||
} state high
|
||||
}
|
||||
ss ss1 {
|
||||
state init {
|
||||
when (delay(10)) {
|
||||
printf("sncExample: Startup delay over\n");
|
||||
} state low
|
||||
}
|
||||
state low {
|
||||
when (v > 5.0) {
|
||||
printf("sncExample: Changing to high\n");
|
||||
} state high
|
||||
}
|
||||
state high {
|
||||
when (v <= 5.0) {
|
||||
printf("sncExample: Changing to low\n");
|
||||
} state low
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user