NerfUS mobile node that manages a target for the Nerf gun firing range

Dependencies:   LedController mbed-rtos mbed NerfUSXbee Servomotor TargetManager

Fork of NerfUS by NerfUS

Committer:
Maxime Dupuis
Date:
Sun Feb 26 10:20:18 2017 -0500
Revision:
16:fba7c8e39388
Add tests for servomotor

Test strategy:

- Servomotor depends on PwmOutInterface (via dependency injection)
- In the real app, we will use RealPwmOut, which will simply
delegate all calls to mbed's PwmOut
- In unit tests, we will create a MockPwmOut to test that it gets
used properly

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Maxime Dupuis 16:fba7c8e39388 1 #ifndef MOCK_PWM_OUT_HPP
Maxime Dupuis 16:fba7c8e39388 2 #define MOCK_PWM_OUT_HPP
Maxime Dupuis 16:fba7c8e39388 3
Maxime Dupuis 16:fba7c8e39388 4 #include "PwmOutInterface.hpp"
Maxime Dupuis 16:fba7c8e39388 5
Maxime Dupuis 16:fba7c8e39388 6 class MockPwmOut : public PwmOutInterface
Maxime Dupuis 16:fba7c8e39388 7 {
Maxime Dupuis 16:fba7c8e39388 8 public:
Maxime Dupuis 16:fba7c8e39388 9 MOCK_METHOD1(pulsewidth_ms, void(int ms));
Maxime Dupuis 16:fba7c8e39388 10 };
Maxime Dupuis 16:fba7c8e39388 11
Maxime Dupuis 16:fba7c8e39388 12 #endif