// Lighting returns the ambient lighting in lx.
502386
func (d *BH1750FVI) Lighting() (float64, error) {
	select {
	case lighting := <-d.lightingReadings:
		return lighting, nil
	default:
		return d.measureLighting()
	}
}
354927
func (s *TextArrayOptions) SetHighlightEnabled(v bool) *TextArrayOptions {
	s.HighlightEnabled = &v
	return s
}
294649
func (f *Function) environment() *lambda.Environment {
	env := make(map[string]*string)
	if !f.Edge {
		for k, v := range f.Environment {
			env[k] = aws.String(v)
		}
	}
	return &lambda.Environment{Variables: env}
}
65572
func (s *SearchSource) Highlight(highlight *Highlight) *SearchSource {
	s.highlight = highlight
	return s
}
629224
func DeviceLight(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "devicelight", Listener: listener}
}
455347
func (l *RgbLedDriver) On() (err error) {
	if err = l.SetLevel(l.pinRed, l.redColor); err != nil {
		return
	}

	if err = l.SetLevel(l.pinGreen, l.greenColor); err != nil {
		return
	}

	if err = l.SetLevel(l.pinBlue, l.blueColor); err != nil {
		return
	}

	l.high = true
	return
}
1340159
func (c *ValidateConfigCall) Context(ctx context.Context) *ValidateConfigCall {
	c.ctx_ = ctx
	return c
}
885422
func (l *Log) Coloring(au aurora.Aurora) string {
	if au == nil {
		return l.msg
	}
	fn := l.Priority.Color(au)
	if fn == nil {
		return l.msg
	}
	return fn(l.msg).String()
}
177755
func (ls *LightStepSpanSink) Flush() {
	ls.mutex.Lock()
	defer ls.mutex.Unlock()

	samples := &ssf.Samples{}
	defer metrics.Report(ls.traceClient, samples)

	totalCount := int64(0)

	ls.serviceCount.Range(func(keyI, valueI interface{}) bool {
		service, ok := keyI.(string)
		if !ok {
			ls.log.WithFields(logrus.Fields{
				"key":  keyI,
				"type": reflect.TypeOf(keyI),
			}).Error("Invalid key type in map when flushing Lightstep client")
			return true
		}

		value, ok := valueI.(*int64)
		if !ok {
			ls.log.WithFields(logrus.Fields{
				"value": valueI,
				"type":  reflect.TypeOf(valueI),
			}).Error("Invalid value type in map when flushing Lightstep client")
			return true
		}

		count := atomic.SwapInt64(value, 0)
		totalCount += count
		samples.Add(ssf.Count(sinks.MetricKeyTotalSpansFlushed, float32(count),
			map[string]string{"sink": ls.Name(), "service": service}))

		return true
	})

	ls.log.WithField("total_spans", totalCount).Debug("Checkpointing flushed spans for Lightstep")
}
790818
func (j *AuroraJob) Environment(env string) Job {
	j.jobConfig.Key.Environment = env
	return j
}
1286985
func (l *LedDriver) On() (err error) {
	if err = l.connection.DigitalWrite(l.Pin(), 1); err != nil {
		return
	}
	l.high = true
	return
}
1117201
func (s *SearchSource) Highlighter() *Highlight {
	if s.highlight == nil {
		s.highlight = NewHighlight()
	}
	return s.highlight
}
392291
func (c Colour) Brightness() float64 {
	return (float64(c.Red()) + float64(c.Green()) + float64(c.Blue())) / 255.0 / 3.0
}
1198084
func (light *Light) Toggle() error {
	if light.State.On {
		return light.Off()
	}
	return light.On()
}
536470
func (whisper *Whisper) LightClientMode() bool {
	val, exist := whisper.settings.Load(lightClientModeIdx)
	if !exist || val == nil {
		return false
	}
	v, ok := val.(bool)
	return v && ok
}
843474
func (_m *Light) CachedColor() common.Color {
	ret := _m.Called()

	var r0 common.Color
	if rf, ok := ret.Get(0).(func() common.Color); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(common.Color)
	}

	return r0
}
399760
func (light *Light) SetColor(color *[2]float32) error {
	lightState := LightState{On: true, XY: color}
	err := light.SetState(lightState)
	if err != nil {
		return err
	}
	return nil
}