Skip to content

Commit e198bef

Browse files
committed
switch back to fixed filter, ready for first release
1 parent 0ec9749 commit e198bef

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

documentation/Logaufbereitung.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#x2=na[:,1:2]
5656
#x3=na[:,1:2]
5757
y=np.int16(na[:,1:2])
58-
z1=na[:,3:4]
58+
z1=na[:,3:4]/10
5959
z=na[:,2:3]
6060

6161
#y=na[:,8:9]
@@ -79,7 +79,7 @@
7979
axs[1].legend(bbox_to_anchor=(1.01, 0), loc="lower left",
8080
mode="expand", borderaxespad=0)
8181
axs[2].plot(z,color='r', label="p_human (W)")
82-
axs[2].plot(z1,color='b', label="cadence (1/min)")
82+
axs[2].plot(z1,color='b', label="speed (kph*10)")
8383
axs[2].legend(bbox_to_anchor=(1.01, 0), loc="lower left",
8484
mode="expand", borderaxespad=0)
8585

ldscripts/gd32f30x_flash.ld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* memory map */
22
MEMORY
33
{
4-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 238K
5-
/*FLASH (rx) : ORIGIN = 0x08004000, LENGTH = 238K*/
4+
/*FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 238K*/
5+
FLASH (rx) : ORIGIN = 0x08004000, LENGTH = 238K
66
/*FLASH (rx) : ORIGIN = 0x0800A800, LENGTH = 238K*/
77
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K
88
}

src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ int main(void)
218218
{
219219

220220
//nvic_vector_table_set(NVIC_VECTTAB_FLASH, 0xA800); //for bootloader v3.8
221-
//nvic_vector_table_set(NVIC_VECTTAB_FLASH, 0x4000); //for bootloader v3
221+
nvic_vector_table_set(NVIC_VECTTAB_FLASH, 0x4000); //for bootloader v3
222222
__enable_irq();
223223

224224
//SCB->VTOR = 0x08004000;
@@ -1293,12 +1293,12 @@ void PAS_processing(void)
12931293
MS.torque_on_crank=(adc_value[2]*3300)>>12; //map ADC value to mV
12941294
PAS_counter=0;
12951295
PAS_flag = 0;
1296-
torque_cumulated-=torque_cumulated>>MP.assist_settings[MS.assist_level][2];
1296+
torque_cumulated-=torque_cumulated>>5;//MP.assist_settings[MS.assist_level][2];
12971297
if(MS.torque_on_crank>750){
12981298
torque_cumulated+=(MS.torque_on_crank-750);
12991299
}
13001300
//Power=2*Pi*speed*torque, calibration factors: rpm to 1/s for cadence: /60, mV to Nm: 750 to 3200 --> 0 to 80 Nm. (from Bafang data sheet)
1301-
MS.p_human=(uint16_t)((float)(MS.cadence*(torque_cumulated>>MP.assist_settings[MS.assist_level][2]))*0.00342); //in Watt
1301+
MS.p_human=(uint16_t)((float)(MS.cadence*(torque_cumulated>>5))*0.00342); //in Watt
13021302
}
13031303

13041304
void Speed_processing(void)
@@ -1865,7 +1865,7 @@ void write_virtual_eeprom(void)
18651865
// fmc_multi_word_program(FMC_OFFSET_PARA0, &Para0[0]);
18661866
// fmc_multi_word_program(FMC_OFFSET_PARA1, &Para1[0]);
18671867
// fmc_multi_word_program(FMC_OFFSET_PARA2, &Para2[0]);
1868-
fmc_multi_word_program(FMC_OFFSET_MP, (uint8_t*)&MP, 22); //86byte in MP
1868+
fmc_multi_word_program(FMC_OFFSET_MP, (uint8_t*)&MP, 22); //88byte in MP
18691869
}
18701870

18711871
void read_virtual_eeprom(void)

0 commit comments

Comments
 (0)