Merge pull request #331 from davidgiven/proto

Assorted minor fixes.
This commit is contained in:
David Given
2021-09-25 21:06:40 +00:00
committed by GitHub
3 changed files with 25 additions and 12 deletions

View File

@@ -127,10 +127,11 @@ Programmer](https://www.cypress.com/products/psoc-programming-solutions).
**Note:** _not_ the Cypress Programmer, which is for a different board!
Cypress will make you register.
Once done, run it. Plug the blunt end of the FluxEngine board into a USB
port (the end which is a USB connector). The programmer should detect it
and report it as a KitProg. You may be prompted to upgrade the programmer
hardware; if so, follow the instructions and do it.
Once done, run it. Plug the blunt end of the FluxEngine board into a USB port
(the end which is a USB plug, with exposed traces; this is on the smaller
section of the board). The programmer should detect it and report it as a
KitProg. You may be prompted to upgrade the programmer hardware; if so, follow
the instructions and do it.
Now go to File -> File Load and open
`FluxEngine.cydsn/CortexM3/ARM_GCC_541/Release/FluxEngine.hex` in the
@@ -151,10 +152,11 @@ CY8CKIT-059 Kit Setup (Kit Design Files, Creator, Programmer, Documentation,
Examples)'. I'm not linking to it in case the URL changes when they update
it.
Once this is done, I'd strongly recommend working through the initial
tutorial and making the LED on your board flash. It'll tell you where all the
controls are and how to program the board. Remember that the big end of the
board plugs into your computer for programming.
Once this is done, I'd strongly recommend working through the initial tutorial
and making the LED on your board flash. It'll tell you where all the controls
are and how to program the board. Remember that you have to plug the
programming connector into your computer to flash it; the microusb socket is
used only for application control.
When you're ready, open the `FluxEngine.cydsn/FluxEngine.cyprj` project,
pick 'Program' from the menu, and the firmware should compile and be

View File

@@ -269,7 +269,7 @@ disks, and have different magnetic properties. 3.5" drives can usually
autodetect what kind of medium is inserted into the drive based on the hole in
the disk casing, but 5.25" drives can't. As a result, you need to explicitly
tell FluxEngine on the command line whether you're using a high density disk or
not with the `--input/output.flux.drive.high_density` configuration setting.
not with the `--flux_source/sink.drive.high_density` configuration setting.
**If you don't do this, your disks may not read correctly and will _certainly_
fail to write correctly.**
@@ -286,14 +286,14 @@ here.](http://www.retrotechnology.com/herbs_stuff/guzis.html)
These flags apply to many operations and are useful for modifying the overall
behaviour.
- `--input.flux.drive.revolutions=X`
- `--flux_source.drive.revolutions=X`
When reading, spin the disk X times. X
can be a floating point number. The default is usually 1.2. Some formats
default to 1. Increasing the number will sample more data, and can be
useful on dubious disks to try and get a better read.
- `--input.flux.drive.sync_with_index=true|false`
- `--flux_source.drive.sync_with_index=true|false`
Wait for an index pulse
before starting to read the disk. (Ignored for write operations.) By
@@ -301,7 +301,7 @@ behaviour.
disk problems it's helpful to have all your data start at the same place
each time.
- `--input.flux.drive.index_source=X`, `--output.flux.drive.index_source=X`
- `--flux_source.drive.index_source=X`, `--flux_sink.drive.index_source=X`
Set the source of index pulses when reading or writing respectively. This
is for use with drives which don't produce index pulse data. `X` can be

View File

@@ -156,6 +156,17 @@ void setProtoFieldFromString(ProtoField& protoField, const std::string& value)
break;
}
case google::protobuf::FieldDescriptor::TYPE_ENUM:
{
const auto* enumfield = field->enum_type();
const auto* enumvalue = enumfield->FindValueByName(value);
if (!enumvalue)
Error() << fmt::format("unrecognised enum value '{}'", value);
reflection->SetEnum(message, field, enumvalue);
break;
}
case google::protobuf::FieldDescriptor::TYPE_MESSAGE:
if (field->message_type() == RangeProto::descriptor())
{