rogy-AquaLab / omniboat_robokit

新歓で使うロボキット
https://rogy-aqualab.github.io/omniboat_robokit/
Apache License 2.0
0 stars 0 forks source link

ledをグローバルに持つ #170

Closed H1rono closed 1 month ago

H1rono commented 2 months ago

49 で言及したやつ

Chikurin1014 commented 2 months ago

これってこんなイメージで実装すればいい感じですか?

// shcneider_model.hpp

namespace omniboat {
    namespace debug {
        enum class LedId {
            First,
            Second,
            Third,
        };

        void led(LedId);
    }
}
// schneider_model.cpp

DigitalOut omniboat::debug::led1(PA_1);
DigitalOut omniboat::debug::led2(PA_3);
DigitalOut omniboat::debug::led3(PA_4);

void omniboat::debug::led(omniboat::debug::LedId led_id) {
    // Schneider::led(int id)の実装をここに移植
}
H1rono commented 2 months ago

なんか違う、僕がやる