Eval » Historie » Revision 10
      « Zurück |
    Revision 10/46
      (diff)
      | Weiter »
    
    Maximilian Seesslen, 14.06.2022 16:15 
    
    
Eval¶
Widgets¶
There is a ODesktop that holds a list of OScreens (or only the curent).
There is a OScreen that holds a list of OWidgets.
When the touch is pressed, the corresponding button can be determined.
An signal can be emmited.
An press-event can be queued, An release-event can be queued. An click-event can be queued if current button matches original pressed button.
- OButton::draw(): completely draws the widget
 - OButton::update(): only draw status-relevant items, e.g. pressed, released, time changed...
 
All screens can be prepared at start.
A Screen can be active or inactive.
Touch¶
There is an touch class that helps converting raw values to X-Y-coordinates
XCAL_25; XCAL_215;
X=( 25 + ( ( RAW-XCAL_25 ) / ( ( XCAL_215 - XCAL_25 ) / ( 215 - 25 ) )  )
Sample:
XCAL_25=100
XCAL_215=2000
( 2000 - 100 ) / 190 = 10 RawPerPixel;
100: 
X = 25 +  ( ( 100-100) / 10 ) = 100
2000:
X = 25 + ( 1900 / 10 ) = 215
Sample 2:
XCAL_25=78
XCAL_215=589
rawPerPixel = (589 - 78) / 190 = approx. 2,6894737
rawPerHektoPixel = ((589 - 78) * 100) / 190 = approx. 268,94737
X = 25 + (  ( ( 589 - 78 ) * 100 ) / 269 )  = approx. 214,96283
To avoid usage of floating point the rawPerPixel is used as rawPerHektoPixel
X=( 25 + ( ( ( RAW-XCAL_25 ) * Hekto ) / ( ( ( XCAL_215 - XCAL_25 ) * Hekto ) / ( 215 - 25 ) )  )
rawPerHektoPixel = ( ( XCAL_215 - XCAL_25 ) * Hekto ) / ( 215 - 25 )
X=( 25 + ( ( ( RAW-XCAL_25 ) * Hekto ) / rawPerHektoPixel )  )
Watch¶
- the OWatch class shows an clock with specific style, analog or digital
 
Example: Minutnik¶
- Main screen; CWatch, Add-Button
 - Add-Screen
	
- Espresso, Weisswurst, Weiches Ei, Hartes Ei, Nudeln, Pizza, Waschmaschine, Cancel; Height 32
 
 - Alarm Screen
 - Logo, Splash screen at boot time and stand-by-screen
 - Release v2.0.0: Mode-Screen: Minutnik, Clock, StopWatch
 
Example: CANDis¶
- Main screen
	
- Button for Light, Sensemux-Diagram, Activity (TV, Musik, Solder, Off), Miniminutnik
 - Header with Clock
 
 - Light-Screen
	
- Power-Widget
 - Ok-Button
 
 - Clock-Screen (Screen saver)
	
- Clock, Date, Temperature, Quick-Access-Buttons
 
 
Von Maximilian Seesslen vor mehr als 3 Jahren aktualisiert · 10 Revisionen