fine
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								doc/inverter0_2016-09-23-1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/inverter0_2016-09-23-1.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 9.1 KiB | 
							
								
								
									
										
											BIN
										
									
								
								doc/inverter0_2016-09-23-2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/inverter0_2016-09-23-2.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.6 KiB | 
							
								
								
									
										
											BIN
										
									
								
								doc/inverter0_2016-09-23-3.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/inverter0_2016-09-23-3.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.5 KiB | 
| @@ -38,7 +38,7 @@ float sineValues[NUM_OF_SINE_VALUES] = { | |||||||
| 		0.0000 | 		0.0000 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| volatile uint16_t pulseWidths[NUM_OF_SINE_VALUES * 2] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; | volatile uint16_t pulseWidths[NUM_OF_SINE_VALUES * 2]; | ||||||
| volatile uint8_t pulseWidthIdx = 0; | volatile uint8_t pulseWidthIdx = 0; | ||||||
| volatile uint8_t activeOffset = 0; | volatile uint8_t activeOffset = 0; | ||||||
|  |  | ||||||
| @@ -97,7 +97,7 @@ void inverterSetFrequency(uint16_t f) { | |||||||
| 	uint8_t currentOffset = (activeOffset == 0) ? NUM_OF_SINE_VALUES : 0; | 	uint8_t currentOffset = (activeOffset == 0) ? NUM_OF_SINE_VALUES : 0; | ||||||
| 	for (uint8_t i = 0; i < NUM_OF_SINE_VALUES; i++) { | 	for (uint8_t i = 0; i < NUM_OF_SINE_VALUES; i++) { | ||||||
| 		uint16_t pw = (uint16_t)(slotLength * sineValues[i]); | 		uint16_t pw = (uint16_t)(slotLength * sineValues[i]); | ||||||
| 		pulseWidths[i + currentOffset] = (pw == sl) ? (pw - 15) : pw; | 		pulseWidths[i + currentOffset] = (pw == sl) ? (pw - 25) : pw; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	__disable_interrupt(); | 	__disable_interrupt(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Wolfgang Hottgenroth
					Wolfgang Hottgenroth