/**
  * @return JsonResponse
  */
 public function pumpModeAction(Request $request)
 {
     $data = ['message' => 'no_action', 'mode' => null];
     if ($request->request->has('mode')) {
         if ($this->brewControlManager->setPumpMode($request->request->get('mode'))) {
             $data['message'] = 'success';
         } else {
             $data['message'] = 'error';
         }
         $data['mode'] = $request->request->get('mode');
     }
     return JsonResponse::create($data);
 }
Esempio n. 2
0
 /**
  * Sets the temperature of the Heater Control Module
  *
  * @param float $setpoint
  */
 public function setHeaterTemperature($setpoint)
 {
     $this->brewControlManager->setMashTemperature($setpoint);
 }