1.0.11 • Published 11 months ago

highlandtech-ch5hooks v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Collection of React Hooks for Crestron CH5 Projects Tested with Crestron CRComLib : 2.11.0

Example usage:

Subscribe to single events: const Mode = useSubscribeAnalog(50); // analog join 50 const power = useSubscribeDigital(99); // digital join 99 const Name = useSubscribeSerial(10); // serial join 10

Subscribe to collections. Useful when you have a group of joins and may need to loop through the arrays

// Create the Collection Constants const display1Source, display2Source, display3Source, display4Source, display5Source, display6Source, display7Source, display8Source, = useSubscribeSerialCollection( // Assign the join numbers for the constants "300", "301", "302", "303", "304", "305", "306", "307", );

Publish Events:

---------------------------Analogs------------------------- Create a analog constant : const value = useSetAnalog("800"); Send analog join "800" a value of "300" : value("300")

---------------------------Digitals------------------------- Pulse: Create a digital constant: const requestHelp = usePulseDigital(); Pulse digital join "10" for .75 seconds : helpRequest(10)

Set: Create a digital constant: const lock = useSetDigital(); Set digital join to either true to false : lock(10 , true) : lock(10 , false)

highlandtech-ch5hooks

highlandtech-ch5hooks

1.0.11

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago