refactor: rename states for clarity and consistency
- Updated state names in constants and related files from WAIT, REACT, TYPE, SLEEP to WAITING, REACTING, TYPING, SLEEPING. - Adjusted all references to the renamed states across the codebase, including state handlers and transition logic. - Ensured that logging messages reflect the new state names for better readability.
This commit is contained in:
@ -177,16 +177,16 @@ class OwenDemo {
|
||||
|
||||
switch (event.key) {
|
||||
case '1':
|
||||
this.owenSystem.transitionTo(States.WAIT)
|
||||
this.owenSystem.transitionTo(States.WAITING)
|
||||
break
|
||||
case '2':
|
||||
this.owenSystem.transitionTo(States.REACT)
|
||||
this.owenSystem.transitionTo(States.REACTING)
|
||||
break
|
||||
case '3':
|
||||
this.owenSystem.transitionTo(States.TYPE)
|
||||
this.owenSystem.transitionTo(States.TYPING)
|
||||
break
|
||||
case '4':
|
||||
this.owenSystem.transitionTo(States.SLEEP)
|
||||
this.owenSystem.transitionTo(States.SLEEPING)
|
||||
break
|
||||
case ' ':
|
||||
this.sendTestMessage()
|
||||
|
||||
@ -92,7 +92,7 @@ class SimpleOwenExample {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async demonstrateStateTransitions () {
|
||||
const states = [States.REACT, States.TYPE, States.WAIT, States.SLEEP]
|
||||
const states = [ States.REACTING, States.TYPING, States.WAITING, States.SLEEPING ]
|
||||
|
||||
for (const state of states) {
|
||||
console.log(`🔄 Transitioning to ${state.toUpperCase()} state...`)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user