Severson-Group / AMDC-Firmware

Embedded system code (C and Verilog) which runs the AMDC Hardware
http://docs.amdc.dev/firmware
BSD 3-Clause "New" or "Revised" License
30 stars 5 forks source link

Add ramp injection functionality #262

Closed Bharat-Ramadas closed 2 years ago

Bharat-Ramadas commented 2 years ago

This PR addresses issue #261 by adding a ramp function to sys/injection.c, along with all the supporting functions that go with it. Will be useful to emulate encoders while testing with hardware.

The code was tested on an AMDC RevD board to prove that it indeed does work as expected. In order to test out this functionality, the injection command was logged on the AMDC. The command passed to the AMDC was inj ramp theta* set 0 360 0.1. The resulting theta* waveform, logged at 1 kHz, is shown below.

ramp

npetersen2 commented 2 years ago

@Bharat-Ramadas before merging this, you'll also need to update the docs website page to add instructions on how to use this injection function type.

Bharat-Ramadas commented 2 years ago

@Bharat-Ramadas before merging this, you'll also need to update the docs website page to add instructions on how to use this injection function type.

Shouldn't we merge this in first before adding in instructions in the docs page?

npetersen2 commented 2 years ago

My plan is to merge at the same time, so hold off on clicking merge on this PR here until the docs are ready to be merged

npetersen2 commented 2 years ago

In reality, we should probably wait until this gets merged to the release branch v1.0.x before we merge the docs update.

npetersen2 commented 2 years ago

The new commits now resolve #267

npetersen2 commented 2 years ago

Ensure this is merged with a Squash and merge into develop