File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77## Usage
88
99``` typescript
10- import { DisplayManager , VCPFeatureCode } from " @ddc-node/ddc-node" ;
10+ import { DisplayManager , VCPFeatureCode } from ' @ddc-node/ddc-node'
1111
12- const displays = await ( new DisplayManager ()) .collect ();
12+ const displays = await new DisplayManager ().collect ()
1313
1414for (const display of displays ) {
15- const vcp_feature = await display .getVcpFeature (VCPFeatureCode .ImageAdjustment .Luminance );
16- console .info (` Display at index ${display .index } have a brightness value of ` );
17- console .info (vcp_feature );
18- await display .setVcpFeature (VCPFeatures .ImageAdjustment .Luminance , vcp_feature .currentValue + 5 );
15+ const vcp_feature = await display .getVcpFeature (VCPFeatureCode .ImageAdjustment .Luminance )
16+ console .info (` Display at index ${display .index } have a brightness value of ` )
17+ console .info (vcp_feature )
18+ await display .setVcpFeature (VCPFeatures .ImageAdjustment .Luminance , vcp_feature .currentValue + 5 )
1919}
2020```
Original file line number Diff line number Diff line change 3131 "access" : " public"
3232 },
3333 "repository" : " git@github.com:ThalusA/ddc-node.git"
34- }
34+ }
Original file line number Diff line number Diff line change 3131 "access" : " public"
3232 },
3333 "repository" : " git@github.com:ThalusA/ddc-node.git"
34- }
34+ }
Original file line number Diff line number Diff line change 3434 "access" : " public"
3535 },
3636 "repository" : " git@github.com:ThalusA/ddc-node.git"
37- }
37+ }
Original file line number Diff line number Diff line change 3434 "access" : " public"
3535 },
3636 "repository" : " git@github.com:ThalusA/ddc-node.git"
37- }
37+ }
Original file line number Diff line number Diff line change 3131 "access" : " public"
3232 },
3333 "repository" : " git@github.com:ThalusA/ddc-node.git"
34- }
34+ }
Original file line number Diff line number Diff line change 3131 "access" : " public"
3232 },
3333 "repository" : " git@github.com:ThalusA/ddc-node.git"
34- }
34+ }
Original file line number Diff line number Diff line change @@ -291,13 +291,13 @@ impl JsDisplay {
291291 pub fn update_capabilities ( & mut self ) -> Option < String > {
292292 let mut display = self . display . lock ( ) . unwrap ( ) ;
293293 display
294- . 0
295- . handle
296- . capabilities_string ( )
297- . map_or ( None , |capabilities_string| {
298- std:: str:: from_utf8 ( capabilities_string. as_slice ( ) ) . map_or ( None , |capabilities_string| {
299- Some ( capabilities_string. to_string ( ) )
300- } )
294+ . 0
295+ . handle
296+ . capabilities_string ( )
297+ . map_or ( None , |capabilities_string| {
298+ std:: str:: from_utf8 ( capabilities_string. as_slice ( ) ) . map_or ( None , |capabilities_string| {
299+ Some ( capabilities_string. to_string ( ) )
301300 } )
301+ } )
302302 }
303303}
You can’t perform that action at this time.
0 commit comments