1.0.11 • Published 1 year ago

highlandtech-ch5hooks v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago