generated from thinkode/modelRepository
24-project-life (#28)
Fix peripherals states and implements plug and reload feature. Graphics improvements. Stability improvements. Reviewed-on: #28
This commit was merged in pull request #28.
This commit is contained in:
@@ -30,9 +30,9 @@ func NewOS2LPeripheral(peripheralData PeripheralInfo) (*OS2LPeripheral, error) {
|
||||
func (p *OS2LPeripheral) Connect(ctx context.Context) error {
|
||||
log.Info().Str("file", "OS2LPeripheral").Msg("OS2L peripheral connected")
|
||||
go func() {
|
||||
runtime.EventsEmit(ctx, string(PeripheralStatus), p.info, "connecting")
|
||||
runtime.EventsEmit(ctx, string(PeripheralStatusUpdated), p.info, "connecting")
|
||||
time.Sleep(5 * time.Second)
|
||||
runtime.EventsEmit(ctx, string(PeripheralStatus), p.info, "disconnected")
|
||||
runtime.EventsEmit(ctx, string(PeripheralStatusUpdated), p.info, "disconnected")
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user