now without global
This commit is contained in:
@@ -6,22 +6,19 @@
|
||||
## ##
|
||||
##############################################
|
||||
|
||||
globals:
|
||||
- id: cs_pin
|
||||
type: gpio::GPIOPin*
|
||||
|
||||
script:
|
||||
- id: update_bars
|
||||
then:
|
||||
- lambda: |-
|
||||
// update display left:
|
||||
id(cs_pin) = new gpio::GPIOPin(id(display_bar1_left));
|
||||
auto cs_pin = id(display_bar1_left).get_pin();
|
||||
id(bar_display).set_cs_pin(id(((cs_pin)));
|
||||
id(bar_display).set_rotation(DisplayRotation::DISPLAY_ROTATION_270_DEGREES);
|
||||
id(bar1_left_page1).execute();
|
||||
id(bar_display).update();
|
||||
// update display right:
|
||||
id(cs_pin) = new gpio::GPIOPin(id(display_bar1_right));
|
||||
auto cs_pin = id(display_bar1_right).get_pin();
|
||||
id(cs_pin) = new GPIOPin(id(display_bar1_right));
|
||||
id(bar_display).set_cs_pin(id((cs_pin)));
|
||||
id(bar_display).set_rotation(DisplayRotation::DISPLAY_ROTATION_90_DEGREES);
|
||||
id(bar1_right_page1).execute();
|
||||
|
||||
Reference in New Issue
Block a user