Automatically disable mobile hotspot when no device is connected, using Tasker

I am trying to create a task which automatically disables mobile hotspot (tethering) when no device is connected. I successfully created similar tasks for bluetooth and wifi, however wifi mobile hotspot I seem not to able to get information on how to check if there are clients currently connected or when no client is connected. I researched a bit, a got a hint that this code :

ip neigh show dev wlan0  | grep -i -e reachable -e delay | grep  

can give information on clients currently connected to hotspot.

This was the output in terminal:

u0_a209@hws8701:/ $   su  -i -e reachable -e delay | grep -o' ..\:..\:..'                              < unknown option --  usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZz] [-A num] [-B num] [-C[num]]         [-e pattern] [-f file] [--binary-files=value] [--color=when]         [-e pattern] [-f file] [--binary-files=value] [--color=when]         [--context[=num]] [--directories=action] [--label] [--line-buffered]         [pattern] [file ...] [1] + Done                 ip neigh show dev wlan0 |       Stopped (signal)     grep -i -e reachable -e delay |       Done (2)             grep -o" ..\:..\:.." 2|root@hws8701:/ # 

however I don’t know how to manipulate this code to get more useful information to create a variable for zero clients connected.

Design Review Of SOLID Principles For An Autonomous Mobile Robot

I am self-learning robotics, C++ and good object oriented design. I have asked various questions over the past couple of weeks: 1 and 2 that have lead to the following design.

The design goal is for portability. It is a Go-To-Goal Differential Drive Robot with PID to regulate the behavior.

I am hoping my design is robust enough so that once I have more understanding of dynamic vehicle models, that I can simply plug those in without modifications ; the O in SOLID 🙂

please note I have not compiled this code yet, I am not looking for a syntax check, just rough design review

The state of the robot is represented as follow:

struct SensorConfig {   // required config values };  class Sensor {    public:   virtual ~Sensor() = default;    // basic checks to ensure sensor is still   // functioning correctly   virtual bool IsActive() = 0;    //    virtual void Init(const SensorConfig& config) = 0;     virtual vector<double> const ReadMeasurement() = 0;   };  class State {   public:    virtual ~State() = default;    virtual void Update(const vector<double> values) = 0;   virtual void Update(const vector<Sensor>& sensors) = 0;    // overloading the operator so that I can measure   // the error between target state and current state   // each model can have its own way of deciding how to do that   virtual vector<double> operator- const (const State& state) = 0;  };  class UnicycleModel : public State {   public:   UnicyleModel(double velocity, double omega, double wheel_radius, double distance_between_wheels);    virtual void Update(vector<Sensor>& sensors)   {     if (sensors.size() < 2)       {     // FAIL with error message       }     Sensor r_wheel_odometry = sensors.at(0);     Sensor l_wheel_odometry = sensors.at(1);      double r_rotation_rate = r_wheel_odometry.ReadMeasurement().at(0);     double l_rotation_rate = r_wheel_odometry.ReadMeasurement().at(0);      // apply unicyle model equations to     // set velocity_ and omega_;    };    // just an example   virtual vector<double> operator- const (const State& state)   {     // example     return vector{state.omega - this->omega_, state.velocity - this->velocity};   }   private:   double velocity_;   double omega_;   double wheel_radius;   double distance_between_wheels_;   };  class LongitudinalDynamicsModel : public State {    public:   LongitudinalDynamicsModel(double velocity, double theta, double phi, // etc);    virtual void Update(vector<Sensor>& sensors)   {      // apply vehicle dynamics equations to     // set state;    };    virtual vector<double> operator- const (const State& state)   {     // example     return vector{state.velocity - this->velocity, //etc};   }  private:   // state representation };  class LatDynamicsModel : public State {    public:   LatDynamicsModel(double velocity, double theta, double phi, // etc);    virtual void Update(vector<Sensor>& sensors)   {      // apply vehicle dynamics equations to     // set state;    };    virtual vector<double> operator- const (const State& state)   {     // example     return vector{state.velocity - this->velocity, //etc};   }  private:   // state representation }; 

The go-to-goal behavior is represented as

class PID {   public:   virtual ~PID() = default;    virtual State const CalculateError(const State& target_state, const State& current_state) = 0;    virtual void SetProportionalGain(const double& kp) = 0;   virtual void SetIntegralGain(const double& ki) = 0;   virtual void SetDifferentialGain(const double& kd) = 0;  };  class Actuator {   public:   virtual ~Actuator() = default;    virtual bool Apply(const State& error) = 0; };  class Motor {  pubic:   Motor(Pwm speed_pin, Ouput control_a, Output control_b);    inline bool Start();   inline bool Stop();   inline bool SpinForward();   inline bool SpinBackward();  };  class UniCycleDriver : public Actuator {   public:   UniCycleDriver(Motor& right_motor, Motor& left_motor);    virtual bool Apply(const State& error) {    };    inline bool Start();   inline bool Stop();   inline bool DriveForward();   inline bool DriveBackward();    inline const bool IsDrivnigForward();   private:   bool is_driving_forward_;   Motor right_motor_;   Motor left_motor_;  };  class FrontWheelDriver : public Actuator {    public:    virtual bool Apply(const State& error) {    };  }; 

Then finally, the main part of the system, where the control loops will take place

// this class should be instantiated in main along with calls to factories required to instantiate the sensors, states, etc.. class ControlAgent {    // set target state   // measure current state   // calculate error   // apply error   public:   ControlAgent(const vector<Sensor>& sensors,            PID& regulator,            Actuator& actuator);    void SetTargetState(const State& state);    void ClosedLoop()   {     State error = regulator.CalculateError(target_state_, current_state_);      while (target - error > some_threshold)       {     actuator.Apply(error);     current_state_.Update(sensor);     error = regulator.CalculateError(target_state_, current_state_);           }   };  private:   State current_state_;   State target_state_;  }; 

ELI5: Help me understand remediation / debugging when functional tests fail on mobile apps (iOS or Android)

Situation: QA runs functional tests on real devices, using any framework like Appium or XCUITest, or Espresso. Let’s say you have true positive failures. These QA folks only know how to zip up the logs and send them over to you in engineering…

My question is: What is the ELI5 process for remediation or debugging? You look at which logs first typically? The Device logs? If you have a stack trace of a fatal exception what do you do? You load up your IDE like XCode and go to that portion of the code? Are there tools for log analysis? (something you just import logs into, and get some sort of point in the right direction?) What’s good about the way QA passes bug information back to you, and what could be incrementally better?

How to implement list filter functionality for mobile use case

I have a list of vehicles in a mobile application. The user needs to be able to filter the list of vehicles with a few rules/requirements:

  • User must be able to filter the list of vehicles i.e search for a vehicle or select one fro a list.
  • User must be able to select and view one or multiple vehicles at a time.
  • Must try stick to OS default search / filtering functionality and UI. Specifically for iOS and Android.
  • Must be quick and easy for the user to filter. Not a lot of steps in the process.

Other info: – Most customers have 3-7 vehicles in their list in total. – There are a few customers who have up to 30 vehicles in their list to select from, so they need to be catered for too but are the minority.

What is the best way to do the vehicle filter without adding too many steps for the user?

Elementos do Tema Mobile WordPress Desalinhado

Comprei um tema terrível para meu site e depois de um tempo a versão mobile além de apresentar problemas na logo header, que com muito trabalho eu consegui arrumar. Também desconfigurou todo o alinhamento das imagens, que antes eram centralizadas e no tamanho correto. O que pode ser e como posso arrumar? Desde já obrigado!

Exemplos: https://i.imgur.com/AakN8Hf.jpg https://i.imgur.com/dOjGGhf.jpg https://i.imgur.com/O72qlV1.jpg https://i.imgur.com/mAQR8rE.jpg

Two Click actions on mobile screen

I was working on a mobile project and I faced a problem. How do I show if there are two different actions on a single object in mobile?

enter image description here

In this screen all options have sub-options that appear on a new page that slides in after clicking on Option 1 from Level 1. How do I take the user back to Option 1 page from the Sub Option page? Which action should trigger this?

enter image description here

Sidebar positioning on mobile – review form

I’m updating a review page where users are asked to leave feedback on their recent course purchase.

Students who purchase courses on our site don’t instantly get access to their course.

Some users may have to wait up to 2 days to get access. Because of this we have users leaving negative reviews because they haven’t received their login details.

To try and aid users who are about to leave a negative review due the delayed delivery of course credentials, I’ve added a purchase help section to the page. On desktop I’ve placed this content in the sidebar, so the focus is still on the review form, but I’m having difficulties positioning this section on mobile.

I’ve come up with two designs, the first is a collapsing panel, the idea features an anchor link which scrolls the users to the bottom of the page where the panel is positioned. Am I approaching this in the right way?

Desktop: Desktop

enter image description here

enter image description here