| 36 | { |
| 37 | public: |
| 38 | Fl2FluxSource(const Fl2FluxSourceProto& config): _config(config) |
| 39 | { |
| 40 | log("FL2: reading {}", _config.filename()); |
| 41 | _proto = loadFl2File(_config.filename()); |
| 42 | |
| 43 | _extraConfig.mutable_drive()->set_rotational_period_ms( |
| 44 | _proto.rotational_period_ms()); |
| 45 | if (_proto.has_drive_type()) |
| 46 | _extraConfig.mutable_drive()->set_drive_type(_proto.drive_type()); |
| 47 | |
| 48 | std::vector<CylinderHead> chs; |
| 49 | for (const auto& trackFlux : _proto.track()) |
| 50 | chs.push_back(CylinderHead{ |
| 51 | (unsigned)trackFlux.track(), (unsigned)trackFlux.head()}); |
| 52 | _extraConfig.mutable_drive()->set_tracks( |
| 53 | convertCylinderHeadsToString(chs)); |
| 54 | } |
| 55 | |
| 56 | public: |
| 57 | std::unique_ptr<FluxSourceIterator> readFlux(int track, int head) override |
nothing calls this directly
no test coverage detected